Three Essays On Contract Theory And Applications