     :kv-area/handle handle}])
 (tsky/register-handler :kv-area/new [middleware/debug] kv-area-new)
 
+;; TODO: Can we use :db.fn/cas? (RM 2015-09-03)
 (defn kv-area-set
   "Set V as the value of key K in the key-value area indentified by HANDLE."
   [db [kv-handle k v]]

             [?a :kv-area/cells ?c]]
    kv-handle]
   [:db.fn/call retract-entities '[:find [?e ...] :where [?e :tag/s-id _]]]])
(th-utils/register-handler* material-added)

  (let [eids (apply d/q q db q-args)]
    (map (fn [eid] [:db.fn/retractEntity eid]) eids)))

;; REFACTOR: Factor out retracting a key-value area. (RM 2015-09-08)
;; Note: The key-value area for the add-material-view is created when the view
;;       is created and the view holds on to the handle. Therefore we only clear
;;       the key-value area, but don't retract the handle.
