 		tableView.cellForRow(at: indexPath)?.accessoryType = UITableViewCellAccessoryType.checkmark
 		tableView.deselectRow(at: indexPath, animated: true)
 
-		let selectedCityID = (UIApplication.shared.delegate as? AppDelegate)?.supportedCities![indexPath.row] // FIXME: For the love of god, fix this!
-		let selectedCityName = (UIApplication.shared.delegate as? AppDelegate)?.citiesList[selectedCityID!]?.name
-		UserDefaults.standard.set(selectedCityID, forKey: Defaults.selectedCity)
-		UserDefaults.standard.set(selectedCityName!, forKey: Defaults.selectedCityName)
+        let selectedCity = availableCities[indexPath.row]
+
+        UserDefaults.standard.set(selectedCity.name, forKey: Defaults.selectedCity)
+        UserDefaults.standard.set(selectedCity.name, forKey: Defaults.selectedCityName)
 		UserDefaults.standard.synchronize()
 
 		if let lotlistVC = UIApplication.shared.keyWindow?.rootViewController?.childViewControllers[0] as? LotlistViewController {
 			lotlistVC.updateData()
 		}
 
-		navigationController?.popToRootViewController(animated: true)
+		let _ = navigationController?.popToRootViewController(animated: true)
 	}
 
 }

//

import UIKit

class CitySelectionTVC: UITableViewController {

	override func viewDidLoad() {
		super.viewDidLoad()
	}

	// MARK: - Table view data source

	}

	override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return availableCities.count
	}

	override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
		let cell = tableView.dequeueReusableCell(withIdentifier: "citySelectionCell", for: indexPath)
        let selectedCity = UserDefaults.standard.string(forKey: Defaults.selectedCity) ?? ""

        let city = availableCities[indexPath.row]

        cell.textLabel?.text = city.name
        cell.textLabel?.textColor = city.hasActiveSupport ? .black : .lightGray
		cell.accessoryType = city.name == selectedCity ? .checkmark : .none

		return cell
	}
