         
         let params = ",".join(jsonParams)
         let js = "\(name).invoke('\(method)', \(params))"
-        swiftR.webView.evaluateJavaScript(js, completionHandler: nil)
+        signalR.webView.evaluateJavaScript(js, completionHandler: nil)
     }
     
     func ensureHub() {
         let js = "if (typeof \(name) == 'undefined') \(name) = connection.createHubProxy('\(name)')"
-        swiftR.webView.evaluateJavaScript(js, completionHandler: nil)
+        signalR.webView.evaluateJavaScript(js, completionHandler: nil)
     }
 }
 

    
    var handlers: [String: AnyObject? -> ()] = [:]
    
    let swiftR: SwiftR!
    
    init(name: String, swiftR: SwiftR) {
        self.name = name
        self.swiftR = swiftR
    }
    
    public func on(method: String, handler: (AnyObject? -> ())?) {
        ensureHub()
        handlers[method] = handler
        swiftR.webView.evaluateJavaScript("addHandler(\(name), '\(method)')", completionHandler: nil)
    }
    
    public func invoke(method: String, parameters: [AnyObject]?) {

    }
    
    public func createHubProxy(name: String) -> Hub {
        let hub = Hub(name: name, signalR: self)
        hubs[name.lowercaseString] = hub
        return hub
    }
