Replace mode in the constraint solver with semantic options
Refactor duplicating code. Correctly pass the previous solution to the
constraint solver's underlying solver