Cleanup the solver code