Title: Essays on Credit Markets and the Macroeconomy