         tableView.register(UINib(nibName: "PhraseTableViewCell", bundle: nil), forCellReuseIdentifier: "Cell")
         tableView.estimatedRowHeight = 200
         tableView.rowHeight = UITableViewAutomaticDimension
+
+        KonjacFirebase.sharedInstance.configureDatabase()
+
+        KonjacFirebase.sharedInstance.addObserveChanges { (konjacModels) in
+            self.tableView.reloadData()
+            print(konjacModels)
+        }
     }
     
     override func viewWillAppear(_ animated: Bool) {

        let storyboard = UIStoryboard(name: "RikoModalViewStoryboard", bundle: Bundle.main)
        let riko = storyboard.instantiateInitialViewController() as! RikoModalViewController

        // FIXME: use real data!
        riko.engPhrase = "asta la vista babies"
        riko.jpnPhrase = "さよならだぜベイビ"
        
        let rootViewController = UIApplication.shared.delegate?.window!?.rootViewController
        rootViewController!.modalPresentationStyle = UIModalPresentationStyle.currentContext
        present(riko, animated: true)

    }
    */

    func modelForIndexPath(indexPath: IndexPath) -> KonjacModel? {
        if indexPath.row < 0 || indexPath.row >= KonjacFirebase.sharedInstance.konjacSnaps.count {
            return nil
        }

        return KonjacFirebase.sharedInstance.konjacSnaps[indexPath.row]
    }

}

extension PhrasesViewController: UITableViewDelegate {
