Moved decoding of message objects into this library.