Fix deprecated symbol warning.
Add trait for message serialization.