ENH: Additional refactoring.