Essays in macroeconomics with informational frictions