* Add generations to serialized state * Make IdTypeMap into a field struct * Less code duplication * Implement garbage collection during serialization * Add unit-test * Add docstring * Build fix * another fix