Improvements

Theres a bunch of things in here, you should be able to see what I've done via the commit history. If you want me to explain anything just ask :)