     (.start)))
 
 (defn key-handler [target]
-  (goog.events.KeyHandler. target))
+  (KeyHandler. target))
 
 (defn level []
   (.-value (dom/getElement "level")))

(ns ez-snake.core
  (:require-macros [cljs.core.async.macros :refer [go go-loop]])
  (:require [goog.dom :as dom]
            [goog.style :as style]
            [goog.events :as events]
            [goog.Timer :as timer]
            [goog.events.KeyHandler :as keyh]
            [cljs.core.async :refer [put! chan <! close!]]
            [ez-snake.game :refer [new-game! crawl! turn! game]]))

(defn listen [ch el type]
  (events/listen el type #(put! ch %))

  (new-game! level)
  (beat timer level))

(let [timer (Timer.)
      rounds (listen (chan) (dom/getElement "new-game") "click")]
  ((juxt handle-buttons handle-keystrokes #(handle-timer timer)))
  (go (while (<! rounds)
