refactored message class to be more flexible
Merge remote-tracking branch 'origin/master'