Replaced do-while with Macro<Begin/End>