Tidy up comments and formatting a little