 
 (defn commit-prune
   [node path]
-  (if (seq path)
-    (let [[parent i] (peek path)]
-      (recur
-       (->> (if (some identity (:children node)) node)
-            (assoc (:children parent) i)
-            (assoc parent :children))
-       (pop path)))
-    (if (every? nil? (:children node))
-      (assoc node :children nil)
+  (let [children (filter identity (:children node))
+        node (if (seq children)
+               (if (= 1 (count children))
+                 (if-let [d (:data (first children))]
+                   (assoc node :data d :children nil)
+                   node)
+                 node))]
+    (if (seq path)
+      (let [[parent i] (peek path)]
+        (recur
+         (->> node
+              (assoc (:children parent) i)
+              (assoc parent :children))
+         (pop path)))
       node)))
 
 (defn add-point*

      (if (< py (+ y h)) 0 2)
      (if (< py (+ y h)) 1 3)))
  (child-for-point [this p]
    (let [idx (child-index-for-point this p)] [(children idx) idx]))
  (make-child-for-point [this p add?]
    (let [idx (child-index-for-point this p)]
      (if (children idx)

  (make-child-for-point [this p add-p?])
  (node-bounds [this])
  (split-node [this])
  (add-point [this p])
  (delete-point [this p]))

(defn commit-path
  [node path]
