Improved solver.