Refactoring, first round