Refactor solution structure