Tidy up of code and comments
Merge branch '1.0.1'