Refactored macros