replaced Constraint with DBConstraint objects, moved logic from Solver to Constraint