Some renaming and refactoring.