refactored much of the serialize/unserialize, send/receive code in the Message class