Tidy up and comment