     var imageCache = [String:UIImage]()
     var api : APIController!
     let kCellIdentifier: String = "SearchResultCell"
+    var refreshControl:UIRefreshControl!
 
     // Base
     /*************************/

        api = APIController(delegate: self)
        UIApplication.sharedApplication().networkActivityIndicatorVisible = true
        api.searchItunesFor("Beatles")
    }
    
    override func didReceiveMemoryWarning() {

    /*************************************************/
    // Functions
    /*************************************************/
    func refresh(sender:AnyObject)
    {
        // get data
        api = APIController(delegate: self)
        UIApplication.sharedApplication().networkActivityIndicatorVisible = true
        api.searchItunesFor("Beatles")
    }
    
    func didReceiveAPIResults(results: NSArray) {
        dispatch_async(dispatch_get_main_queue(), {
            self.albums = Album.albumsWithJSON(results)
            self.appsTableView!.reloadData()
            self.refreshControl.endRefreshing()
            UIApplication.sharedApplication().networkActivityIndicatorVisible = false
        })
    }
