minor refactoring in message.h, less macros more templates