Refactor constraint hashing
fixup! WIP