Macroeconomic Fluctuations and Firm Dynamics: Technology, Production and Capital Formation