Made message serialization / deserialization recursive