fixup: macro engine refactoring