Essays on Firms, Debt Contracts and Equity Market