Tidy up to prepare for pull request