Refactor silliness out of Solver.solve