Some refactoring.
More refactoring.