I would prefer the code to be written using templates rather than macros. If possible and if you have time, please, rework the code to avoid excessive use of macros.