Yes, this is a monster commit but at this stage I'm the only one working on this project anyway. Further commits will follow Best Practises™ again.