Refactoring macros