Essays in macroeconomics of debt deleveraging