pestspotted code tidy up and comments