Three essays in financial frictions