         }
     }
     
+    
+    
+    // create a cell for each table view row
+    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        
+        // create a new cell if needed or reuse an old one
+        let cell:UITableViewCell = tableViewList.dequeueReusableCell(withIdentifier: cellReuseIdentifier) as UITableViewCell!
+        
+        // set the text from the data model
+        cell.textLabel?.text = tableViewData[indexPath.row]
+        
+        return cell
+    }
+    
+    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return tableViewData.count
+    }
+    
 }

        
        super.viewDidLoad()
        
    }
    
    // create a cell for each table view row
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        
        // create a new cell if needed or reuse an old one
        let cell:UITableViewCell = tableViewList.dequeueReusableCell(withIdentifier: cellReuseIdentifier) as UITableViewCell!
        
        // set the text from the data model
        cell.textLabel?.text = tableViewData[indexPath.row]
        
        return cell
    }
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return tableViewData.count
    }
    


//  FirebaseNavigationVIewController.swift
//  HomeRemote
//
//  Controls the Navigation VC through the Firebase JSON.
//
//  Created by Lucas McDonald on 2/25/17.
//

import UIKit
import Foundation
import Firebase

class FirebaseNavigationViewController: UITableViewController {
    
    // UI elements
    let cellReuseIdentifier = "cell"
    var tableViewData = [String]()
    @IBOutlet var tableViewList: UITableView!
    
    
    // Navigational elements
    var ref = FIRDatabase.database().reference().child("devices")
    var prevRef = ""
    var nodeDepth = 0
    
    /******************
       Setup Methods
    ******************/
    
    override func viewDidLoad() {
        
        // Register the table view cell class and its reuse id
        self.tableViewList.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
