Essays on the Economics of Contracts and Organizations