Moved to a better structure of the macro.