refactors macro engine
introduces macro bundles