Refactoring into 3 seperate classes - Solution, Equation, Algorithm.