Misc tidying and consolidation.