                (#(if (:drag-grip %)
                    (merge % {:on-mouse-down (mouse-down node path)}) %))
                (#(if (:remove-click %)
-                   (merge % {:on-click (remove-click node path)}) %))))
+                   (merge % {:on-click (fn []
+                                         (reset! root-node
+                                                 (remove-node @root-node path)))})
+                   %))))
     block))
 
-(defn set-attrs [block node path]
+(defn set-attrs [block node path root-node]
   (if (vector? block)
     (into []
           (map #(-> %
-                    (attach-node-attr node path)
-                    (set-attrs node path))
+                    (attach-node-attr node path root-node)
+                    (set-attrs node path root-node))
                block))
     block))
 

                                                :drag-path (:start-path s)
                                                :add-as-child false))))))} 
      [drag-ghost display]
      [tree-node @root-node [] display true]]]))

(enable-console-print!)

       [placeholder display path])
     (if-not (empty? (:children node))
       (for [[pos child] (map vector (range) (:children node))]
         [tree-node child (conj path pos) display root-node false]))]
    (if-not (or is-root? (:add-as-child @state))
      [placeholder display path])]])

