Added generic message serialization capabilities.