More small refactorings