ENH: More refactoring.