     :after  (fn do-effects-after
               [context]
               (->> (:effects context)
-                   (map (fn [[key val]]
-                          (if-let [effect-fn  (get-handler kind key true)]
-                            (effect-fn val))))
+                   (map (fn [[k value]]
+                          (if-let [effect-fn  (get-handler kind k true)]
+                            (effect-fn value))))
                    doall))))
 
-;; -- Standard Builtin Effects Handlers  --------------------------------------
+;; -- Builtin Effect Handlers  ------------------------------------------------
 
 ;; :dispatch-later
 ;;
-;; `dispatch` one or more events in given times on the future. Expects a collection
+;; `dispatch` one or more events after given delays. Expects a collection
 ;; of maps with two keys:  :`ms` and `:dispatch`
 ;;
 ;; usage:

;;
(register
  :dispatch-n
  (fn [val]
    (if-not (sequential? val)
      (console :error "re-frame: ignoring bad :dispatch-n value. Expected a collection, got got: " val))
    (doseq [event val] (router/dispatch event))))


;; :deregister-event-handler
;;
;; removes an event handler. Expects either a single id (typically a keyword), or a seq of ids.
;;
;; usage:
;;   {:deregister-event-handler: :my-id)}
;; or:
;;   {:deregister-event-handler: [:one-id :another-id]}
;;
(register
  :deregister-event-handler
  (fn [val]
    (let [clear-event (partial clear-handlers events/kind)]
      (if (sequential? val)
        (doall (map clear-event val))
        (clear-event val)))))


(register
  :db
  (fn [val]
    (reset! app-db val)))



(register
  :dispatch
  (fn [value]
    (if-not (vector? value)
      (console :error "re-frame: ignoring bad :dispatch value. Expected a vector, but got: " value)
      (router/dispatch value))))


;; :dispatch-n
