More small refactorings.