 
      func numberOfSectionsInTableView(tableView: UITableView) -> Int {
         // Return the number of sections.
-        return 1
+        //return 1
+		return self.sections.count
     }
 
      func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
         // Return the number of rows in the section.
-        return self.newsEntries.count
+        //return self.newsEntries.count
+		return sections[sortedSections[section]]!.count
     }
 	
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
+//		let cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(self.cellIdentifier, forIndexPath: indexPath) as! UITableViewCell
+//		
+//		// Configure the cell for this indexPath
+//		cell.textLabel!.text = (newsEntries.objectAtIndex(indexPath.row) as! NewsEntry).title
+//		cell.detailTextLabel?.text = (newsEntries.objectAtIndex(indexPath.row) as! NewsEntry).section
+//			// + ", " + (newsEntries.objectAtIndex(indexPath.row) as! NewsEntry).shortDescription!
+//		//cell.detailTextLabel!.lineBreakMode = .ByWordWrapping;
+//		cell.detailTextLabel!.numberOfLines = 2; // Show 2 lines
+		
 		let cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(self.cellIdentifier, forIndexPath: indexPath) as! UITableViewCell
-		
-		// Configure the cell for this indexPath
-		cell.textLabel!.text = (newsEntries.objectAtIndex(indexPath.row) as! NewsEntry).title
-		cell.detailTextLabel?.text = (newsEntries.objectAtIndex(indexPath.row) as! NewsEntry).shortDescription
-		//cell.detailTextLabel!.lineBreakMode = .ByWordWrapping;
-		cell.detailTextLabel!.numberOfLines = 2; // Show 2 lines
-
+
+		let tableSection = sections[sortedSections[indexPath.section]]
+		let tableItem = tableSection![indexPath.row]
+
+		cell.textLabel!.text = tableItem.title
+		cell.detailTextLabel?.text = tableItem.shortDescription
+		cell.detailTextLabel?.numberOfLines = 2; // Show 2 lines
+		
 		return cell
     }
+	
+	func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
+		return sortedSections[section]
+	}
 	
     func getHighFiJSON(whichFeed : String){
         println("getHighFiJSON: \(whichFeed)")

							publishedDateJS: $0["publishedDateJS"] as! String,
							shortDescription: $0["shortDescription"] as? String,
							mobileLink: $0["mobileLink"] as? String,
							sectionID: $0["sectionID"] as! Int
							//	let picture: String?
							//	let originalPicture: String?
							//	let originalURL: String


		self.tableView!.dataSource = self
		
		// `UIKit` convenience class for sectioning a table
		let collation = UILocalizedIndexedCollation.currentCollation() as! UILocalizedIndexedCollation
		
		calendar.timeZone = NSTimeZone.systemTimeZone()
		dateFormatter.timeZone = calendar.timeZone
		dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.000'Z'"

        getHighFiJSON(highFiEndpoint)
		
		self.refreshControl = UIRefreshControl()
