Tidy up and some commenting