MacroExtensions: refactoring