             request = NSMutableURLRequest(URL: NSURL(string: urlString)!)
         }
 
-        var session = NSURLSession.sharedSession()
+        let session = NSURLSession.sharedSession()
         request.HTTPMethod = methodName
         if let p : Dictionary<String, String> = params as? Dictionary<String, String> {
             if (methodName == "POST" || methodName == "PUT") {

                    rawRequestCompletionHandler(json: nil, responseError: NSError(domain: "GeneralHTTPError", code: httpResponse.statusCode, userInfo: nil))
                }
            } else {
                rawRequestCompletionHandler(json: nil, responseError: NSError(domain: error.localizedDescription, code: error.code, userInfo: error.userInfo))
            }
        })
        task.resume()


    func request(methodName : String, endpointName: String, token: AnyObject?, params: AnyObject?, requestCompletionHandler: (json: AnyObject?, responseError: NSError?) -> Void) {
         if let t : String = token as? String {
            let ts = NSDate().timeIntervalSince1970
            let tosign = "/2/\(endpointName)||\(ts)"
            let hmac = tosign.hmac(.SHA512, key: t)
            let extraParams = "?signature=\(hmac)"
            print("To Sign: \(tosign) signed: \(hmac)")
            rawRequest(methodName, urlString: KuggleAPI.baseURL() + endpointName + extraParams, headers: ["Token": t, "Nonce": "\(ts)"], params: params, rawRequestCompletionHandler: {json, error -> Void in
                if error == nil {
                    let meta = (json as! NSDictionary)["meta"] as! NSDictionary
                    let metaCode = meta.objectForKey("code") as! NSInteger
