Added operators to contract validity checks.
Refactoring.