Some helper macros
Implement output management