Added a Messaging protocol module to manage the message stucture. This shoul make the maintance of messaging easier and the code more modular and easy to test