Converted the solver algorithm code into a class. Fixes #2.