Parent constraints implemented. Most set constraints implemented. Some
bug fixes and refactoring.