Essays in financial intermediation