Some good refactorings