Added some docblocks and a small tidy