Tidy up and added some of the usual helpers.