Tidy up and commenting