Shortened code for operator support in contracts.
Refactored tests.