Make Solver non-template and merge with BasicSolver.