added message class and other changes
changed messaging format to xml