Essays on Financial Intermediaries and Market Frictions