Refactor solution.