Message parsing

Wrote code for messages to be parsed, sent and received.  Some things
are broken.