Cleaning up messaging interface to use classes for message objects.