Essays On Optimal Contract Design