tidy up comments and unused lines