    (fn [el-loc]
      (some (fn [[name script]]
              (when-let [script-loc (script el-loc)]
-               [(name el-loc) script-loc]))
+               [(name script-loc) script-loc]))
            channel-deconstructors))))
 
 (comment
-  (deconstruct-node (mi/file-path :global-scripts mirthsync.xml/app-conf1)
-                    (:el-loc mirthsync.xml/app-conf1))
-
-  (deconstruct-node (mi/file-path mirthsync.xml/api1 mirthsync.xml/app-conf1)
-                    mirthsync.xml/el-loc1)
-
-  (loop [el-loc mirthsync.xml/el-loc1]
-    (if (cz/end? el-loc)
-      (cz/root el-loc)
-      (let [script-name (cdzx/xml1-> el-loc :connector :name)
-            script (cdzx/xml1-> el-loc :connector :properties :script)
-            ]
-        ;; (log/infof "script-name: %s" script-name)
-        ;; (log/infof "script: %s" script)
-        (println (type script))
-        (when script
-          (printf "Found a script named %s\n" (cdzx/text script-name)))
-        (recur (cz/next el-loc))))
-    )
-
-  (def all-locs (take-while (complement cz/end?) (iterate cz/next mirthsync.xml/el-loc1)))
-  (def all-branches (filter cz/branch? all-locs))
-  (map #(:tag (cz/node %)) all-locs)
-
-  (reduce (fn [result el-loc]
-            (let [script-name (cdzx/xml1-> el-loc :connector :name)
-                  script (cdzx/xml1-> el-loc :connector :properties :script)]
-              (if script
-                (conj result [(cdzx/text script-name) (cdzx/text script) (:tag (cz/node el-loc))] )
-                result))) [] all-locs)
+
+  ;; pull
+  (mirthsync.core/main-func "-s" "https://localhost:8443/api"
+                            "-u" "admin" "-p" "admin" "-t" "target/tmp"
+                            "-i" "-f" "pull")
+
+  ;; load a channel for repl work
+  (def el-loc2 (cz/xml-zip (cdx/parse-str (slurp "target/tmp/Channels/This is a group/Hello DB Writer.xml"))))
+
+  ;; select first transformer elements
+  (cdzx/xml1-> el-loc2 :sourceConnector :transformer :elements cz/node)
+
+  (def first-transformer-jscript-step
+    (cdzx/xml1-> el-loc2
+                 :sourceConnector
+                 :transformer
+                 :elements
+                 :com.mirth.connect.plugins.javascriptstep.JavaScriptStep
+                 :script
+                 [cz/up cz/up cz/up :transformer cz/up :sourceConnector]))
 )

  (let [base-path (mf/remove-extension file-path)]
    (loop [el-loc el-loc
           deconstruction []]
      (if (cz/end? el-loc)
        (conj deconstruction [file-path (cdx/indent-str (cz/root el-loc))])
        (let [[script-name script] (find-name-val el-loc)

  (:require [clojure.data.xml :as cdx]
            [clojure.data.zip :as cdz]
            [clojure.data.zip.xml :as cdzx]
            [clojure.tools.logging :as log]
            [clojure.zip :as cz]
            [mirthsync.actions :as ma]
            [mirthsync.files :as mf]
            [mirthsync.interfaces :as mi]
            [clojure.string :as cs])
  (:import java.io.File))

(defn- api-element-id
