         (get-in [:terrain/type :terrain-type/image])
         (string/replace "COLOR" color-name))))
 
-(defn terrain-tile [{:keys [conn] :as app} terrain q r]
+(defn terrain-tile [view-ctx terrain q r]
   (let [[x y] (offset->pixel q r)
         image (terrain-image terrain)]
     [:image {:x x :y y
              :width 32 :height 34
              :xlink-href (str "/images/game/" image)}]))
 
-(defn tile [{:keys [conn dispatch] :as app} terrain]
+(defn tile [{:as view-ctx :keys [dispatch]} terrain]
   (let [{:keys [terrain/q terrain/r]} terrain]
     ^{:key (str q "," r)}
     [:g {:on-click #(dispatch [::events.ui/select-hex q r])}
-     [terrain-tile app terrain q r]
-     [tile-border app q r]
-     [board-unit app q r]
-     [tile-mask app q r]]))
-
-(defn tiles [{:keys [conn] :as app}]
+     [terrain-tile view-ctx terrain q r]
+     [tile-border view-ctx q r]
+     [board-unit view-ctx q r]
+     [tile-mask view-ctx q r]]))
+
+(defn tiles [view-ctx]
   (into [:g]
-        (for [terrain @(subs/terrains conn)]
-          [tile app terrain])))
+        (for [terrain @(subs/terrains view-ctx)]
+          [tile view-ctx terrain])))
 
 ;; TODO: computer board size based on map size
-(defn board [app]
+(defn board [view-ctx]
   [:svg#board {:width 500 :height 500}
-   [tiles app]])
-
-(defn faction-credits [{:keys [conn] :as app}]
-  (let [{:keys [faction/credits]} @(subs/current-faction conn)
-        {:keys [map/credits-per-base]} @(subs/game-map conn)
-        income @(subs/current-income conn)]
+   [tiles view-ctx]])
+
+(defn faction-credits [view-ctx]
+  (let [{:keys [faction/credits]} @(subs/current-faction view-ctx)
+        {:keys [map/credits-per-base]} @(subs/game-map view-ctx)
+        income @(subs/current-income view-ctx)]
     [:p#faction-credits
      [:strong (str credits " Credits")]
      [:span.text-muted.pull-right (str "+" income)
       [:span.hidden-md "/turn"]]]))
 
-(defn copy-url-link [{:keys [conn dispatch] :as app}]
+(defn copy-url-link [view-ctx]
   (let [clipboard (atom nil)
         text-fn (fn [] js/window.location)]
     (r/create-class

        (get-in [:unit/type :unit-type/image])
        (string/replace "COLOR" color-name))))

(defn board-unit [{:keys [conn dispatch] :as app} q r]
  (when-let [unit @(subs/unit-at conn q r)]
    (let [[x y] (offset->pixel q r)
          image (unit-image unit)]

                :title "Configure faction"}]]]))))

;; TODO: cleanup unit-picker
(defn unit-picker [{:as view-ctx :keys [conn dispatch]}]
  (let [unit-types @(subs/available-unit-types conn)
        cur-faction @(subs/current-faction conn)
        color (name (:faction/color cur-faction))
