Refactoring the solution structure