Refectored message generation to keep code DRY
Merge pull request #2 from cybrox/message-refactoring

Refectored message generation to keep code DRY