Some refactoring, some renaming.