Major simplifications to macros module.