 
 (defn lens-cursor [parent getter setter]
   (let [id (new-reactive-id)
+        binding-info (get-binding-fns parent)
         cur (Cursor.
              id parent nil nil
+             (fn [] (getter ((.-raw-deref parent))))
              (fn [f & args]
                (swap! parent
                       (fn [x] (setter x (apply f (getter x) args)))))
              (getter @parent) nil nil #js {} 0 nil)
-        binding-info (get-binding-fns parent)]
-    ((.-add-watch binding-info) parent id
-     (fn [k r o n] (.updateCursor cur (getter n))))
-    (set! (.-dispose-fn cur)
+        activate-fn
+        (fn []
+          ((.-add-watch binding-info) parent id
+           (fn [k r o n] (.updateCursor cur (getter n)))))]
+    (activate-fn)
+    (set! (.-activate-fn cur) activate-fn)
+    (set! (.-clean-fn cur)
           (fn [] ((.-remove-watch binding-info) parent id)))
     cur))
 

      (doseq [child (get child-cursors child-key)]
        (.updateCursor child new-val)))
    (updateCursor [this new-state]
      (let [old-state state]
        (set! state new-state)
        (when-not (identical? old-state state)
          (if-let [change-ks (.-change-ks this)]
            (let [change-ks (if (keyword? change-ks)
                              [(case change-ks

    (-assoc-in! [this ks v]
      (set! (.-change-ks this) ks)
      (swap-fn assoc-in ks v)))

(defn atom
  "Creates and returns a ReactiveAtom with an initial value of x and zero or
