        {:insecure? true})
       :body                             ;extract the response body
       to-zip                            ;get an xml zipper
-      (zx/xml-> :list :channel)         ;get a zipper per channel
+      (zx/xml-> :list :channel)         ;get a loc per channel
       ))
 
 (defn process-channel
   "Take a channel zip and write to the filesystem"
   [chanzip]
-  (let [channel-name (first (zx/xml-> chanzip :name zip/node))
+  (let [channel-name (zx/xml1-> chanzip :name zip/down zip/node)
         channel-xml (xml/indent-str (zip/node chanzip))
         base-dir "blarfnarg" ;; (java.util.UUID/randomUUID)
         file-path (str base-dir "/" channel-name)]

  "App logic"
  [base-url username password]
  (with-authentication base-url username password
    #(map process-channel (fetch-all-channels-zip base-url))))

(defn -main
  [& args]

      :insecure? true})
    (func)))

(defn fetch-all-channel-locs
  "Fetch all channels from remote server and return a sequence of
  channel locs within the zipper"
  [base-url]
  (-> base-url
      (str "/channels")                 ;combine the base url with the rest path
