 
 (defn- create-storage
   []
-  (Storage. (HTML5LocalStorage.)))
+  (storage-factory/create))
 
 (defn- create-runtime
   []

  (:require-macros [cljs.core.async.macros :refer [go alt!]])
  (:require [cljs.reader :refer [read-string]]
            [cljs.core.async :refer [chan]]
            [pot.core.bl :refer [make-board add-random-cells]]
            [pot.core.hand :refer [process-msg]])
  (:import [goog.storage Storage]
           [goog.storage.mechanism HTML5LocalStorage]))

(defn- create-config
  {:pre [(every? number? [height width init win-value])

  (let [storage (:storage system)
        history (-> system :history deref)
        hkey (-> system :config deref :history-store-key)]
    (.set storage hkey history)
    system))

(defn- restore-system
