merge ContourConstraint and Constraint classes: now takes 'model' argument