 
 class Lift {
 
+    struct Settings {
+        static var timeoutInterval: NSTimeInterval = 30
+        static var cachePolicy: NSURLRequestCachePolicy = NSURLRequestCachePolicy.UseProtocolCachePolicy
+    }
+
     class func asyncSend(request: NSURLRequest, block: (data: [String:AnyObject]?, error: NSError) -> Void) {
 
         [NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) { (response: NSURLResponse!, data: NSData!, error: NSError!) -> Void in
 
-            if (error) {
-                block(data: nil, error: error)
+            if let e = error {
+                block(data: nil, error: e)
                 return
             }
 

        var response: NSURLResponse?
        var error: NSError?

        var data: NSData = NSURLConnection.sendSynchronousRequest(request, returningResponse: &response, error: &error)

        if let e = error {
            return [:]
        }

        var jsonError: NSErrorPointer?
        var responseData: [String: AnyObject] = Lift.dictionaryFromJSONData(data, jsonError: jsonError)

        if let e = jsonError {
            error = jsonError?.memory

        return json;
    }

    class func request(url: NSURL) {

        var request: NSMutableURLRequest

        request = NSMutableURLRequest(URL: url)
        request.cachePolicy     = Lift.Settings.cachePolicy
        request.timeoutInterval = Lift.Settings.timeoutInterval

    }

}
