     (def session-tags-key (format session-tags-key-template session-id))
 
     (doall
-      (map (partial car/hset session-key)
+      (map #(car/hset session-key (key %1) (val %1))
            (select-keys defaulted-reqs
                         [:browser-name :node :reserved :current-url])))
     (car/del session-tags-key)

                              current-url]
                       :or {browser-name "firefox"
                            node nil
                            reserved nil
                            tags nil
                            extra-desired-capabilities nil
                            reserve-after-create nil
                            force-create nil
                            current-url nil}
                       :as requirements}]
  (with-car*
    (def defaulted-reqs {})
    (def capabilities (merge {"browserName" browser-name}
                             extra-desired-capabilities))
    (def wd (new-webdriver (get-node) capabilities))

(ns shale.sessions
  (:require [clj-webdriver.remote.driver :as remote-webdriver]
            [taoensso.carmine :as car :refer (wcar)])
  (:use [shale.webdriver :only [new-webdriver resume-webdriver to-async]]
        clojure.walk))

(def redis-conn  {:pool {} :spec {}})
(defmacro with-car*  [& body] `(car/wcar redis-conn ~@body))

(def redis-key-prefix "_shale")
(def session-set-key
  (apply str (interpose "/" [redis-key-prefix "sessions"])))
(def session-key-template
  (apply str (interpose "/" [redis-key-prefix "sessions" "%s"])))
(def session-tags-key-template
  (apply str (interpose "/" [redis-key-prefix "session" "%s" "tags"])))

(defn get-node []
  "http://localhost:5555/wd/hub")
