Various tidy ups in preparation for CRM-12984