Essays On Credit Markets And Corporate Finance