diff --git a/redfish-core/include/schemas.hpp b/redfish-core/include/schemas.hpp
index d27d368..c2a78dc 100644
--- a/redfish-core/include/schemas.hpp
+++ b/redfish-core/include/schemas.hpp
@@ -67,8 +67,8 @@
         "MetricReportCollection",
         "MetricReportDefinition",
         "MetricReportDefinitionCollection",
-        "odata-v4",
         "odata",
+        "odata-v4",
         "OperatingConfig",
         "OperatingConfigCollection",
         "PCIeDevice",
@@ -86,8 +86,8 @@
         "ProcessorCollection",
         "redfish-error",
         "redfish-payload-annotations",
-        "redfish-schema-v1",
         "redfish-schema",
+        "redfish-schema-v1",
         "Redundancy",
         "Resource",
         "Role",
diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
index f6eca42..b1075d8 100755
--- a/scripts/update_schemas.py
+++ b/scripts/update_schemas.py
@@ -7,7 +7,6 @@
 from io import BytesIO
 
 import requests
-from packaging.version import parse
 import generate_schema_enums
 
 VERSION = "DSP8010_2022.2"
@@ -165,36 +164,34 @@
 zip_ref = zipfile.ZipFile(zipBytesIO)
 
 
-def version_sort_key(key):
-    """
-    Method that computes a sort key that zero pads all numbers, such that
-    version sorting like
-    0_2_0
-    0_10_0
-    sorts in the way humans expect.
-    it also does case insensitive comparisons.
-    """
-    key = str.casefold(key)
+class SchemaVersion:
+    '''
+    A Python class for sorting Redfish schema versions.  Allows sorting Redfish
+    versions in the way humans expect, by comparing version strings as lists
+    (ie 0_2_0 comes before 0_10_0) in the way humans expect.  It does case
+    insensitive schema name comparisons
+    '''
 
-    # Decription of this class calls it "Version numbering for anarchists and
-    # software realists.".  That seems like exactly what we need here.
+    def __init__(self, key):
+        key = str.casefold(key)
 
-    if not any(char.isdigit() for char in key):
-        split_tup = os.path.splitext(key)
-        key = split_tup[0] + ".v0_0_0" + split_tup[1]
+        split_tup = key.split(".")
+        self.version_pieces = [split_tup[0]]
+        if len(split_tup) < 2:
+            return
+        version = split_tup[1]
 
-    # special case some files that don't seem to follow the naming convention,
-    # and cause sort problems.  These need brought up with DMTF TODO(Ed)
-    if key == "odata.4.0.0.json":
-        key = "odata.v4_0_0.json"
-    if key == "redfish-schema.1.0.0.json":
-        key = "redfish-schema.v1_0_0.json"
+        if version.startswith("v"):
+            version = version[1:]
+        if any(char.isdigit() for char in version):
+            self.version_pieces.extend([int(x)
+                                       for x in version.split("_")])
 
-    return parse(key)
+    def __lt__(self, other):
+        return self.version_pieces < other.version_pieces
 
 
 # Remove the old files
-
 skip_prefixes = "Oem"
 if os.path.exists(schema_path):
     files = [
@@ -228,31 +225,33 @@
 csdl_filenames = []
 json_schema_files = defaultdict(list)
 
-for zip_filepath in zip_ref.namelist():
-    if zip_filepath.startswith("csdl/") and (zip_filepath != "csdl/"):
-        csdl_filenames.append(os.path.basename(zip_filepath))
-    elif zip_filepath.startswith("json-schema/"):
-        filename = os.path.basename(zip_filepath)
+for zip_file in zip_ref.infolist():
+    if zip_file.is_dir():
+        continue
+    if zip_file.filename.startswith("csdl/"):
+        csdl_filenames.append(os.path.basename(zip_file.filename))
+    elif zip_file.filename.startswith("json-schema/"):
+        filename = os.path.basename(zip_file.filename)
         filenamesplit = filename.split(".")
         # exclude schemas again to save flash space
         if filenamesplit[0] not in include_list:
             continue
         json_schema_files[filenamesplit[0]].append(filename)
-    elif zip_filepath.startswith("openapi/"):
+    elif zip_file.filename.startswith("openapi/"):
         pass
-    elif zip_filepath.startswith("dictionaries/"):
+    elif zip_file.filename.startswith("dictionaries/"):
         pass
 
 # sort the json files by version
 for key, value in json_schema_files.items():
-    value.sort(key=version_sort_key, reverse=True)
+    value.sort(key=SchemaVersion, reverse=True)
 
 # Create a dictionary ordered by schema name
 json_schema_files = OrderedDict(
-    sorted(json_schema_files.items(), key=lambda x: version_sort_key(x[0]))
+    sorted(json_schema_files.items(), key=lambda x: SchemaVersion(x[0]))
 )
 
-csdl_filenames.sort(key=version_sort_key)
+csdl_filenames.sort(key=SchemaVersion)
 with open(metadata_index_path, "w") as metadata_index:
     metadata_index.write('<?xml version="1.0" encoding="UTF-8"?>\n')
     metadata_index.write(
