Some more refactorings in new solver