Clean up model / message model

Clean up some elements of the object model and implement
a fuller set of message object ready for implementing an
API.