Implemented memobj serialization; TODO: Fix constructor issue