Three essays in macroeconomics and international economics