Macros for printing introduced

To make the code simpler and DRY.