Macro refactor

Is it ok for you @brissa-a ?