Refactor finalize methods to delegate constraint setup

* This allows the algorithm in the finalize method to be absolutely
  clear, while private methods handle setting up the actual
  constraint.
Refactor constraint method so adding the constraint is separate