Essays on macroeconomics with plant heterogeneity