Essays on Firm Investment and Misallocation