Use classes to create constraints.