     
     fileprivate class func requestImage(at path: String, size: CGSize, completion: @escaping (UIImage?) -> (Void)) {
         let screenScale: CGFloat = UIScreen.main.scale
-        
         let urlString = String(format: path, "\(Int(size.width * screenScale))", "\(Int(size.height * screenScale))")
-        let url = URL(string: urlString)
-        let request = URLRequest(url: url!)
-        NSURLConnection.sendAsynchronousRequest(request, queue: OperationQueue.main) { (response, data, error) -> Void in
-            if error == nil {
-                if let unwrappedData = data {
-                    let image = UIImage(data: unwrappedData, scale: screenScale)
-                    completion(image)
-                } else {
-                    completion(nil)
-                }
-            } else {
+        let url = URL(string: urlString)!
+
+        let task = URLSession.shared.dataTask(with: url) { (data, response, error) in
+            guard error == nil else {
                 print(String(format:"%@ %@ %@", #function, "Wallpaper Error:", String(describing: error)))
-                completion(nil)
-            }
-        }
+                DispatchQueue.main.async {
+                    completion(nil)
+                }
+                return
+            }
+
+            guard let data = data else {
+                print(String(format:"%@ %@", #function, "Wallpaper missing response data"))
+                DispatchQueue.main.async {
+                    completion(nil)
+                }
+                return
+            }
+
+            DispatchQueue.main.async {
+                let image = UIImage(data: data, scale: screenScale)
+                completion(image)
+            }
+        }
+        task.resume()
     }
 }
 

    public class func placeText(numberOfParagraphs: Int, paragraphLength: WPTextParagraphLength, textOptions: WPTextOptions, completion: @escaping (String?) -> (Void)) {
        assert(numberOfParagraphs > 0, "Number of paragraphs is invalid")
        
        var urlString: String = kWPPlaceRandomTextURLString.appending(textOptions.toMaskString())
        urlString = (urlString as NSString).appendingPathComponent("plaintext")
        urlString = (urlString as NSString).appendingPathComponent(paragraphLength.rawValue)
        
        let paragraphArgs = "\(numberOfParagraphs)"
        urlString = (urlString as NSString).appendingPathComponent(paragraphArgs)
        let url = URL(string: urlString as String)
        let request = URLRequest(url: url!)
        NSURLConnection.sendAsynchronousRequest(request, queue: OperationQueue.main) { (response, data, error) -> Void in
            if error == nil {
                if let unwrappedData = data {
                    let returnString = String(data: unwrappedData, encoding: .utf8)
                    completion(returnString)
                } else {
                    completion(nil)
                }
            } else {
                print(String(format:"%@ %@ %@", #function, "Wallpaper Error:", String(describing: error)))
                completion(nil)
            }
        }
    }
    
    public class func placeHipsterIpsum(numberOfParagraphs: Int, shotOfLatin: Bool, completion: @escaping (String?) -> (Void)) {

        } else {
            hipsterPath += "&type=hipster-centric"
        }

        let url = URL(string: hipsterPath)!
        let task = URLSession.shared.dataTask(with: url) { (data, response, error) in
            guard error == nil else {
                print(String(format:"%@ %@ %@", #function, "Wallpaper Error:", String(describing: error)))
                DispatchQueue.main.async {
                    completion(nil)
                }
                return
            }

            guard let data = data else {
                print(String(format:"%@ %@", #function, "Wallpaper missing response data"))
                DispatchQueue.main.async {
                    completion(nil)
                }
                return
            }

            if let JSONDict = try? JSONSerialization.jsonObject(with: data, options: []),
                let dict = JSONDict as? [String : AnyObject] {
                DispatchQueue.main.async {
                    let returnString = dict["text"] as? String
                    completion(returnString)
                }
            } else {
                DispatchQueue.main.async {
                    completion(nil)
                }
            }
        }
        task.resume()
    }
    
    public class func placeHTML(numberOfParagraphs: Int, paragraphLength: WPTextParagraphLength, options: WPHTMLOptions, completion: @escaping (String?) -> (Void)) -> () {
        let url = placeURLForHTML(paragraphLength: paragraphLength, htmlOptions: options)

        let task = URLSession.shared.dataTask(with: url) { (data, response, error) in
            guard error == nil else {
                print(String(format:"%@ %@ %@", #function, "Wallpaper Error:", String(describing: error)))
                DispatchQueue.main.async {
                    completion(nil)
                }
                return
            }

            guard let data = data else {
                print(String(format:"%@ %@", #function, "Wallpaper missing response data"))
                DispatchQueue.main.async {
                    completion(nil)
                }
                return
            }

            DispatchQueue.main.async {
                let returnString = String(data: data, encoding: .utf8)
                completion(returnString)
            }
        }
        task.resume()
    }
    
    public class func placeURLForHTML(paragraphLength: WPTextParagraphLength, htmlOptions: WPHTMLOptions) -> URL {
