#58 Contract API refactoring