Some small refactorings.
More refactorings.