Rething serialization functions in object.h and scene.h