Elements and theories of contracts