Essays in trade, innovation, and productivity