Tidy up ready to fork to use ORM