Still not sure this needs to be a class. Seems like the meat of it could be (something like) `apply_constraints` as a method of `Layer`, probably, and just store the constraints in a list member.