More refactoring work.