cleaning up solver.cpp/h