General tidy up of comments and some code, mainly whitespace.