Refactor macros a little to make them easier to understand