Move the handling of serializations to dedicated classes. Make these serializers available through a registry.