More refactoring work-in-progress