 (defn- item->native-id
   "Returns the native id of an ingest item."
   [item]
-  (some #(get item %) [:granule-ur :entry-title :native-id :EntryTitle]))
-
-(defn generate-metadata
-  "Returns a metadata string representing the ingest item (umm-lib or umm-spec-lib UMM record) in
-  the desired format."
-  [item concept-type format-key]
-  (if (= :umm-json format-key)
-    ;; assuming umm-json is already UMM-spec UMM
-    (umm-spec/generate-metadata concept-type format-key item)
-    (umm/umm->xml item format-key)))
+  (some #(get item %) [:native-id :granule-ur :entry-title :EntryTitle]))
 
 (defn item->concept
   "Returns a concept map from a UMM item or tombstone. Default provider-id to PROV1 if not present."
   ([item]
    (item->concept item :echo10))
   ([item format-key]
-   (let [format (mime-types/format->mime-type format-key)
-         concept-type (legacy/item->concept-type item)]
-     (merge {:concept-type concept-type
+   (let [format (mime-types/format->mime-type format-key)]
+     (merge {:concept-type (umm-legacy/item->concept-type item)
              :provider-id (or (:provider-id item) "PROV1")
              :native-id (or (:native-id item) (item->native-id item))
-             :metadata (when-not (:deleted item) (generate-metadata (dissoc item :provider-id) concept-type format-key))
+             :metadata (when-not (:deleted item) (umm-legacy/generate-metadata (dissoc item :provider-id) format-key))
              :format format}
             (when (:concept-id item)
               {:concept-id (:concept-id item)})

       :revision-id revision-id
       :format format-key
       :collection-concept-id collection-concept-id
       :metadata (legacy/generate-metadata item format-key)})))

(defmethod item->metadata-result true
  [_ format-key item]

                 :metadata metadata
                 :format (mime-types/format->mime-type format-key)}
        response (ingest/ingest-concept concept)]
    (merge (umm-legacy/parse-concept concept) response)))

(defn ingest-concept-with-metadata-file
  "Ingest the given concept with the metadata file. The metadata file has to be located on the
