tidy up some code and commenting