Implement deserialization of custom Message classes
Fix test to expect correct format
remove obsolete code
Serialize null as it is a value aswell
fix recursion