 //
 
 import UIKit
+import Alamofire
 
 class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
 
   var species:Array<StarWarsSpecies>?
   var speciesWrapper:SpeciesWrapper? // holds the last wrapper that we've loaded
   var isLoadingSpecies = false
+  var imageCache: Dictionary<String, ImageSearchResult?>?
   
   @IBOutlet weak var tableview: UITableView?
   

    {
      let species = self.species![indexPath.row]
      cell.textLabel?.text = species.name
      cell.detailTextLabel?.text = species.classification
      
      // See if we need to load more species
      let rowsToLoadFromBottom = 5;

  
  override func viewDidLoad() {
    super.viewDidLoad()
    
    imageCache = Dictionary<String, ImageSearchResult>()
    
    self.loadFirstSpecies()
  }
