some restructuring and simplification in ClaspSolver