Small refactorings to improve code design.