Neaten up source. Ready for a pull request now! :D