            (let [[chs result] args] 2))}})
 
 (defn vis-html [vis actx]
-  (let [d (get-in vis [:actxs actx])]
-    (conj "<div>" (last actx)
-          "<ul>"
-          (map #(conj "<li>" (vis-html vis %) "</li>")
-               (:children d))
-          "</ul>"
-          "</div>")))
+  (if actx
+    ["<div>" (rest actx)
+     "<ul>"
+     (map (fn [child-actx] ["<li>" (vis-html vis child-actx) "</li>"])
+          (sort (keys (get-in vis [:actxs actx :children]))))
+     "</ul>"
+     "</div>"]
+    "no actx"))
 
 (defn vis-init [cmds cmd-handlers]
   (let [vis (atom {:actxs {}}) ; [actx -> {:children {}, :want-chs {}}].

        event-delay (atom 0)
        event-ch (chan)
        last-id (atom 0)
        w [{:gen-id #(swap! last-id inc)
            :event-ch event-ch}]]
    (go-loop [num-events 0]

            [verb step & args] event
            vis-event-handler (get (get vis-event-handlers verb) step)]
        (vis-event-handler vis actx args)
        (set-el-innerHTML "vis-html"
                          (apply str
                                 (flatten (vis-html @vis @root-actx))))
        (set-el-innerHTML "vis"
                          (str "<circle cx='"
                               (mod num-events 500)
