                 ActivityManager.sharedManager().stopActivityIndicator()
                 self.venues = self.sortVenues(venues)
                 self.venuesTableView.reloadData()
+                self.title = "Popular \(categoryName)s"
             })
             
             }, failure: { (error) -> () in
                 print("Failure")
+                self.title = "Couldn't Access Venues"
         })
     }
     

        if let categories = venue.categories {
            if categories.count > 0 {
                newListViewController.selectedVenuesCategoryId = categories[0].id
            }
        }
        self.navigationController?.pushViewController(newListViewController, animated: true)
        tableView.deselectRowAtIndexPath(indexPath, animated: true)
        
    }
    
    private func configureCell(cell: VenueListTableViewCell, withVenue venue: Venue) {

    var currentLocation: CLLocationCoordinate2D!
    var selectedVenueId: String?
    var selectedVenuesCategoryId: String?
    var selectedVenuesCategoryName: String?
    

    override func viewDidLoad() {
        super.viewDidLoad()
        if isMainView {
            self.title = "Locating You..."
            enableRefreshControl()
            findLocation()
        } else {
            //otherwise the top row is hidden behind the nav bar.
            tableTopConstraint.constant = 64
            fetchVenues(currentLocation, categoryId: selectedVenuesCategoryId!, categoryName: selectedVenuesCategoryName!)
        }
    }
    
