Remove backtracking boolean thing and add Terminate method to Solver.