   [{id :id}]
   (get all-files-by-id id))
 
-(def ready-productions
+(defn ready-productions
   "All productions with state \"ready\""
-  (filter #(= (:state %) "ready") all-productions))
+  [productions]
+  (filter #(= (:state %) "ready") productions))
 
 (defn create-ready-productions!
   "Create all productions with state \"ready\""
   []
-  (doseq [p ready-productions]
+  (doseq [p (ready-productions all-productions)]
     (-> p prod/create!)))
 
-(def archived-productions
+(defn archived-productions
   "All productions with state \"archived\""
-  (filter #(= (:state %) "archived") all-productions))
+  [productions]
+  (filter #(= (:state %) "archived") productions))
 
 (defn create-archived-productions!
   "Create all productions with state \"archived\""
   []
-  (->> archived-productions
+  (->> (archived-productions all-productions)
        (map #(assoc % :state "archived"))
        (map prod/add-default-meta-data)
        (apply jdbc/insert! db :production)))

  (println )
  (println "Importing commercial audio books")
  (println)
)

        (assoc :total_time total_time)
        (assoc :library_signature (get production-id-to-library-signature-map (:id m)))
        (select-keys [:id :creator :date :depth :language :library_number :library_signature
                        :narrator :state :produced_date :production_type
                        :revision_date :source :source_date :source_publisher
                        :subject :title :total_time :volumes]))))

