added classes. Constraint simplification now works.