Refactoring with solutions.