 (declare make-state-abstracted-subproblem)
 (defn make-eager-state-abstracted-stub [inner-stub in-set]
   (let [ret (traits/reify-traits [summaries/or-summarizable (simple-stub [:SA (stub-name inner-stub) in-set] in-set)])]
-    (connect-and-watch! ret inner-stub #(set-stub-output! ret (make-state-abstracted-subproblem ret %)))
+    (connect-and-watch-stub! ret inner-stub #(set-stub-output! ret (make-state-abstracted-subproblem ret %)))
     ret))
 
 
 ;; DOTO: reduce overhead with deliberate?
 ;; Only wait when inner-stub has no output -- prevent double-wait.
 (defn make-deliberate-state-abstracted-stub [inner-stub in-set]
-  (if-let [out (first (get-outputs inner-stub))]
+  (if-let [out (get-stub-output inner-stub)]
     (let [done? (atom false)  
           ret
           (traits/reify-traits

;; Here we properly deal with weirdness of stubs/inner-sps decreaseing as they add
;; children, by makig sure to do the updates synchronously.

;; TODO: don't bother with names?  Or make names primary...
;; TODO: cache refine-inputs and/or other SPs.
;; TODO: encapsulate stub/sp behaviors somehow.


                                  (simple-stub [:Pair1 (stub-name left-stub) right-name]
                                               (input-set left-stub))])]
    (connect-subsuming! ret subsuming-sp)
    (connect-and-watch-stub! ret left-stub 
      (fn [lo]
        (connect-and-watch-stub! ret
          (make-pair-stub2 subsuming-sp lo (right-stub-fn (output-set lo)))
          #(set-stub-output! ret %))
        (summaries/summary-changed! ret))) ;; TODO: wasteful?
