         (fn [{keys :keys}]
             {:keys
                 (cond
-                    (= (.type event) goog.events.EventType/KEYUP)
+                    (= (.type event) EventType/KEYUP)
                         (disj keys (.keyCode event))
-                    (= (.type event) goog.events.EventType/KEYDOWN)
+                    (= (.type event) EventType/KEYDOWN)
                         (conj keys (.keyCode event))
                     :else keys)})))
 
-(defn tick-imp [state tick-step]
-    (assoc state :nodes
-        (update-node-positions
-            (update-node-velocities
-                (:nodes state)
-                (calculate-all-node-forces (:nodes state) (:springs state))
-                tick-step)
-            tick-step)))
+(defn tick-imp [state tick-step input-state]
+    (assoc state
+        :springs
+            (let [modifier (cond
+                    ((:keys input-state) KeyCodes/Q) 0.99
+                    ((:keys input-state) KeyCodes/W) 1.01
+                    :else 1.0)]
+                (map (fn [s]
+                    (assoc s :rest-length
+                        (* modifier (:rest-length s))))
+                        (:springs state)))
+        :nodes
+            (update-node-positions
+                (update-node-velocities
+                    (:nodes state)
+                    (calculate-all-node-forces (:nodes state) (:springs state))
+                    tick-step)
+                tick-step)))
 
 (defn tick [game-state-ref input-state] (do
-    (swap! game-state-ref #(tick-imp % tick-step))))
+    (swap! game-state-ref #(tick-imp % tick-step input-state))))
 
 (defn world-to-screen [[x y]]
     [x (- 275 y)])
 
 (defn draw-line [g x1 y1 x2 y2]
     (.drawPath g
-        (let [p (Path.)] (do
+        (let [p (goog.graphics.Path.)] (do
             (.moveTo p x1 y1)
             (.lineTo p x2 y2)
             p))
-        (Stroke. 1 "green") nil))
+        (goog.graphics.Stroke. 1 "green") nil))
 
 (defn rerender [canvas-element game-state]
     (let [
-        graphics (goog.graphics/createGraphics 400 300)
+        graphics (graphics/createGraphics 400 300)
         {nodes :nodes springs :springs} game-state]
         (do
             (apply draw-line graphics (apply concat (map world-to-screen [[0 0] [400 0]])))

; :mode=clojure:

(ns hello
    (:use
        [goog.dom :only [appendChild createDom createTextNode removeChildren]]
        [goog.events :only [listen]]
        [goog.events.EventType :only [CLICK]]
        [goog.graphics :only [createGraphics Stroke SolidFill Path]]
        [goog :only [Timer]]
        ))

(def my-code-url "https://github.com/pauldoo/scratch/blob/master/ClojureScript/hello.cljs")

                        (draw-line graphics x1 y1 x2 y2))) springs))
            (dorun (map
                (fn [{p :pos}] (let [[x y] (world-to-screen p)]
                    (.drawCircle graphics x y 3 (goog.graphics.Stroke. 2 "green") (goog.graphics.SolidFill. "yellow"))))
                (vals nodes)))
            (dom/removeChildren canvas-element)
            (.render graphics canvas-element)
            )))

