Essays on the Effects of Frictions on Financial Intermediation