    [:h1 "You control the game!"]
    [:p "Your mission, should you decide to accept it: TODO:describe"] ; TODO Hide when read?
    [:h2 "Controls"]
-   (let [bs {:style "display:block;width:100%;margin-bottom:10px"}]
+   (letfn [(button [cmd label]
+             [:button
+              {:style "display:block;width:100%;margin-bottom:10px",
+               :onclick (command-js cmd)}
+              label])]
     [:div
-     [:button bs "1. Show the task on the projector"]
-     [:button bs "2. Start brainstorming"]
-     [:button bs "3. Start voting"]
-     [:button bs "4. Show voting results"]])))
+     (button "show-task" "1. Show the task on the projector")
+     (button "start-brainstorming" "2. Start brainstorming")
+     (button "start-voting" "3. Start voting")
+     (button "show-voting-results" "4. Show voting results")])))
 
 (defn show-page-for-step [{:keys [remote-addr session] :as req}]
   "Show the right page for the current stage: gamemaster, team registr., voting"

            [ring.middleware.session :refer [wrap-session]]
            [clojure.pprint]))

(def state (atom :voting #_:not-started))
(def team-counter (atom 1))
(def teams (atom {999 "Team 9's idea"}))
(def votes (atom {998 1, 999 3}))

  (GET "/vote-results" [] (page-vote-results))
  (GET "/projector" []
       "TODO: Stuff showing on the projector: 1. the task; 2. /teams; 3. /vote-results")
  (context "/command" [] ; GameMaster posts commands here (TODO? check it really is gm)
           (POST "/show-task" [] "TODO")
           #_(POST "/start-brainstorming" [] (str (compare-and-set! state :oldstate :newstate))) ;; CURRENTLY NOT NEEDED
           (POST "/start-voting" [] (str (compare-and-set! state :brainstorming :voting)))
           (POST "/show-voting-results" [] (str (compare-and-set! state :voting :voting-finished))))
  (route/resources "/")
  (route/not-found "Not Found"))

