Update client code to use new message structure

But this is still not working. More work needed.