Three Essays on Technology and Competition in Bank Lending and Corporate Finance