     var remoteURL: NSURL?
     var lastRefreshDate: NSDate?
     
-    func refresh(completion: ThrowConfigWithInnerBlock? = nil) {
+    func refresh(completion: ThrowWithInnerBlock? = nil) {
+        getCloudConfig { [unowned self] (config) in
+            do {
+                let cloudConfig = try config()
+                self.settings = cloudConfig
+                completion?({ })
+            } catch {
+                completion?({ throw error })
+            }
+        }
+    }
+    
+    func getCloudConfig(completion: ThrowJSONWithInnerBlock) {
+        guard let url = remoteURL
+            else { completion(json: { throw CloudConfig.Error.BadResponse }); return }
+    
+        let request = NSURLRequest(URL: url)
+        let session = NSURLSession.sharedSession()
         
+        let task = session.dataTaskWithRequest(request) { [unowned self] (data, response, error) in
+            let httpResponse = response as! NSHTTPURLResponse
+            let statusCode = httpResponse.statusCode
+            
+            if statusCode == 200 {
+                self.parseCloudConfigFromData(data, completion: completion)
+            } else {
+                completion(json: { throw CloudConfig.Error.BadResponse })
+            }
+        }
+        
+        task.resume()
+    }
+    
+    func parseCloudConfigFromData(data: NSData?, completion: ThrowJSONWithInnerBlock) {
+        guard let configData = data
+            else { completion(json: { throw CloudConfig.Error.BadResponse }); return }
+        
+        do {
+            let json = try NSJSONSerialization.JSONObjectWithData(configData, options: .AllowFragments)
+            if let config = json as? [String : AnyObject] {
+                completion(json: { return config })
+            } else {
+                completion(json: { throw CloudConfig.Error.BadResponse })
+            }
+        } catch {
+            completion(json: { throw error })
+        }
     }
     
 }

        Manually initiates refreshing of local config from cloud config if needed.
        This is also automatically called on `UIApplicationDidBecomeActiveNotification`.
     
        - parameter completion: Completion handler (SEE: `ThrowConfigWithInnerBlock`).
    */
    public class func refresh(completion: ThrowConfigWithInnerBlock? = nil) {
        ACCloudConfig.sharedInstance.refresh(completion)
    }
    


// MARK: Custom Types

/// Block which throws via inner block.
public typealias ThrowWithInnerBlock = (() throws -> Void) -> Void
/// Block which throws dictionary via inner block.
public typealias ThrowJSONWithInnerBlock = (json: () throws -> [String : AnyObject]) -> Void

// MARK: Accessors

