Fix broken removeConstraint and simplify collections.