         controller.dismissViewControllerAnimated(true, completion: nil)
     }
 }
-
-extension UIImageView {
-    func downloadFromURL(imageURL url: NSURL, contentMode mode: UIViewContentMode) {
-        contentMode = mode
-
-        NSURLSession.sharedSession().dataTaskWithURL(url, completionHandler: { (data, response, error) -> Void in
-            guard let httpURLResponse = response as? NSHTTPURLResponse where httpURLResponse.statusCode == 200,
-                let mimeType = response?.MIMEType where mimeType.hasPrefix("image"),
-                let data = data where error == nil,
-                let image = UIImage(data: data) else {
-                    return
-            }
-            
-            dispatch_async(dispatch_get_main_queue()) { () -> Void in
-                self.image = image
-            }
-            
-        }).resume()
-    }
-}

            if let pictureURLString = foundArtist.picture,
                let imageURL = NSURL(string: pictureURLString) {
                
                self.artistImageView.downloadFromURL(imageURL: imageURL, contentMode: .ScaleAspectFit)
            }

            if let urlString = foundArtist.URL,


import UIKit
import SafariServices
import Kingfisher


class ArtistViewController: UIViewController {
