Most of the refactoring now done. Solution is compilable again.