Factoring out version management from the main document serializer