   "Get or create child osn corresponding to this output-set."
   [osn child-output-set]
   (or (-> osn :child-map-atom deref child-output-set)
-      (swap! (:child-map-atom osn) assoc child-output-set (make-child-own osn child-output-set))))
+      (swap! (:child-map-atom osn) assoc child-output-set (make-child-osn osn child-output-set))))
 
 (defn add-plans! "Add plans, refresh summary." [osn new-plans]
   (swap! (:plans-atom osn) concat new-plans)
   (swap! (:plan-summary-atom osn) #(apply max-summary % (map plan-summary new-plans))))
 
-(defn refine-osn-plan!
-  "Refine a single plan stored at this osn."
-  [osn min-reward]
-  (let [[best-plan best-summary rest-plans rest-summary]
-          (extract-best-and-summaries plan-summary @(:plans-atom osn))
-        new-plans (group-by plan-output-set
-                            (expand-plan best-plan (next-min-reward rest-summary min-reward)))]
-    (reset! (:plans-atom osn) (concat (get new-plans (:output-set osn)) rest-plans))
-    (refresh-plan-summary! osn)
-    (doseq [[child-output-set more-plans] (dissoc new-plans (:output-set osn))]
-      (add-plans! (get-osn-child! osn child-output-set) plans))))
-
-(defn refine-osn-child!
-  "Refine a single child osn."
-  [osn min-reward excluded-child-set]
-  (let [[best-child _ _ next-summary]
-          (max-thing-summary-and-next tree-summary (vals @(:child-map-atom osn)))]
-    (refine-osn! best-child (next-min-reward next-summary min-reward) nil)
-    (refresh-descendant-summary! best-child)))
+
 
 (defn refine-osn!
   "Repeatedly refine shallowest best plan covered by osn until solved or below min-reward."
   [osn min-reward excluded-child-set]
   (while (refinable-summary? (broom-summary osn excluded-child-set) min-reward)
     (let [[[best-op] _ _ next-summary]
-          (max-thing-summary-and-next
+          (extract-best-and-summaries
            second
-           [[#(do (refine-osn! (:parent-node osn) % nil) (refresh-ancestor-summary! osn))
-               (ancestor-summary   osn)]
-            [#(refine-osn-plan!  osn %)
-               (plan-summary       osn)]
-            [#(refine-osn-child! osn % excluded-child-set)
-             (descendant-summary osn excluded-child-set)]])]
+           [;; Ancestor
+            [#(do (refine-osn! (:parent-node osn) % nil) (refresh-ancestor-summary! osn))
+             (ancestor-summary   osn)]
+            ;; Direct plan
+            [#(let [[best-plan best-summary rest-plans rest-summary]
+                      (extract-best-and-summaries plan-summary @(:plans-atom osn))
+                    new-plans (expand-plan best-plan (next-min-reward rest-summary %))]
+                (when-not (identical? (util/singleton new-plans) best-plan)
+                  (let [grouped-plans (group-by plan-output-set new-plans)]
+                   (reset! (:plans-atom osn) (concat (get grouped-plans (:output-set osn)) rest-plans))
+                   (doseq [[child-output-set plans] (dissoc grouped-plans (:output-set osn))]
+                     (add-plans! (get-osn-child! osn child-output-set) plans))))
+                (refresh-local-summary! osn))
+             (local-summary       osn)]
+            ;; Descendant
+            [#(let [[best-child _ _ next-summary]
+                    (extract-best-and-summaries
+                     tree-summary (remove excluded-child-set (vals @(:child-map-atom osn))))]
+                (refine-osn! best-child (next-min-reward next-summary %) nil)
+                (refresh-descendant-summary! best-child))
+             (sub-descendant-summary osn excluded-child-set)]])]
       (best-op (next-min-reward next-summary min-reward)))))
 
 

(defn split-osn
  "Return a seq of child osn's (i.e., subset output sets) to split off from osn.
   Currently splits children >= min-reward when parent < min-reward."
  [osp min-reward excluded-child-set]
  (when (< (max-reward (handle-summary osn)) min-reward)
    (filter #(>= (max-reward (tree-summary %)) min-reward)
            (remove excluded-child-set (vals @(:child-map-atom osn))))))

     (Plan. ref-constraint constrained-set plan out-set out-summary))))


(defn propagate-plan-changes
  "Returns a plan by propagating changes starting at the last node in prefix through remaining-nodes.
   Returns nil if the plan becomes infeasible, otherwise a plan."
