Add node serialization/deserialization
Store root as long

Consistency with node children
Clean up deser function

Add retval, fix leak on failed malloc