tidy up and comments