Essays on capital structure and investment