#5. Basic implementation.
#5. Another refactoring of contracts infrastructure.