Black boxes, grey boxes: the scope of contracts in the theory of the firm