     (car/watch node-set-key)
     (try
       (let [url (get (view-model id) :url)]
-        (if (some #{url} (node-pools/get-nodes node-pool))
-          (node-pools/remove-node node-pool url)))
+        (if (some #{url} (node-pools/get-nodes (node-pool config)))
+          (node-pools/remove-node (node-pool config) url)))
       (finally
         (car/srem node-set-key id)
         (car/del (node-key id))


(deftype ConfigNodePool [])

(def node-pool (if (nil? (config :node-pool-impl))
                 (if (nil? (config :node-pool-cloud-config))
                   (node-pools/DefaultNodePool. (or (config :node-list)
                                               ["http://localhost:5555/wd/hub"]))
                   (if (= ((config :node-pool-cloud-config) :provider) :aws)
                     (node-pools/AWSNodePool. (config :node-pool-cloud-config))
                     (throw (ex-info (str "Issue with cloud config: AWS is "
                                          "the only currently supported "
                                          "provider.")
                                     {:user-visible true :status 500}))))
                 (do
                   (extend ConfigNodePool
                     node-pools/INodePool
                       (config :node-pool-impl))
                   (ConfigNodePool.))))

(def default-session-limit
  (or (config :node-max-sessions) 3))

  "Syncs the node list with the backing node pool."
  []
  (locking refresh-nodes-lock
    (let [nodes (to-set (node-pools/get-nodes (node-pool config)))
          registered-nodes (to-set (map #(get % :url) (view-models)))]
      (doall
        (concat
