Added message parser so the tests pass.

Also, added tests for payload: the broker will use this when it's updating itself.