   (support/enable-one!)
   (let [state (app-state)
         top-level-node (find-top-level-node)
-        history-imp (history/new-history-imp top-level-node)
-        ab-tests (get-ab-tests (:ab-test-definitions @state))]
+        history-imp (history/new-history-imp top-level-node)]
     ;; globally define the state so that we can get to it for debugging
     (set! state/debug-state state)
     (browser-settings/setup! state)
-    (main state ab-tests top-level-node history-imp)
+    (main state top-level-node history-imp)
     (if-let [error-status (get-in @state [:render-context :status])]
       ;; error codes from the server get passed as :status in the render-context
       (put! (get-in @state [:comms :nav]) [:error {:status error-status}])

  (swallow-errors
    (assoc [] :deliberate :exception)))

(defn ^:export set-ab-test
  "Debug function for setting ab-tests, call from the js console as frontend.core.set_ab_test('new_test', false)"
  [test-name value]
  (let [test-key (keyword (name test-name))]
    (println "starting value for" test-name "was" (-> @state/debug-state
                                                      :ab-test-definitions
                                                      get-ab-tests
                                                      test-key))
    (set-ab-override (name test-name) value)
    (reinstall-om!)
    (println "value for" test-name "is now" (-> @state/debug-state
                                                :ab-test-definitions
                                                get-ab-tests
                                                test-key))))

(aset js/window "set_ab_test" set-ab-test)

(defn ^:export app-state-to-js
  "Used for inspecting app state in the console."
  []
  (clj->js @state/debug-state))

(aset js/window "app_state_to_js" set-ab-test)


;; Figwheel offers an event when JS is reloaded, but not when CSS is reloaded. A

(defn find-app-container []
  (goog.dom/getElement "app"))

(defn main [state top-level-node history-imp]
  (let [comms       (:comms @state)
        container   (find-app-container)
        uri-path    (.getPath utils/parsed-uri)
