tidy up, ready for merge