   (swap! channels (fn [old]
 
                     (let [all (reduce (fn [accum key]
-                                        (if (closed? (get old key))
+                                        (if (closed? (get accum key))
                                           (do
                                             (println "Getting rid of old connection for " key)
-                                           (dissoc old key))
-                                          old)) old (keys old))
+                                            (dissoc accum key))
+                                          accum)) old (keys old))
                           url-ch (or (get all url)
                                      (let [new-ch (channel)]
                                        (println "creating a channel for url " url)


    ))

(defn parse-uri [uri]
  (apply assoc {} (clojure.string/split uri #"/")))
(defn q-map [[node & children]]
  (let [results (apply merge {} (map q-map children))]
    (if (:path node)

(defn relate-left [model predicate resource]
  (iterator-seq (.listResourcesWithProperty model predicate resource)))


(defn parse-uri [uri]
  (let [parts (filter (comp not (partial re-matches #"^\s*$")) (clojure.string/split uri #"/"))]
    (println "'" uri"'\n\n\n!!!!!!!\n\n\n\n" parts)
    (if (empty? parts)
     {}
     (apply assoc {} parts))))

(defn s-rec [binding model url-parts]

