Added the constraints hierarchy.
Refactorings.