shift core macros out of generator