Refactoring round one