Commenting schedule fragment and general tidy up of code