Move macros to header