Three essays in macroeconomics