     
     /// :nodoc:
     override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
-        return self.timetable?.normalItemDays[section].description
+        return PrimaryUser.loggedIn?.timetable?.normalItemDays[section].description
     }
     
     // MARK: - UIViewController

/// Displays the user's timetable.
class TimetableViewController: UITableViewController {
    
    /// The items being displayed in the view controller.
    var timetable: Timetable?
    
    /// Updates the timetable by making a request to the student timetable service, and reloading the data in the table.
    @objc func updateTimetable() {
        guard let accessToken = PrimaryUser.loggedIn?.authenticator.accessToken else {
            self.tableView.refreshControl?.endRefreshing()
            return
        }
        
        StudentTimetableService(accessToken: accessToken).makeRequest { result in
            switch result {
            case .success(let timetable):
                self.timetable = timetable
            case .error(let error):
                print(error)
            }
            
            DispatchQueue.main.async {
                self.tableView.reloadData()
                self.tableView.refreshControl?.endRefreshing()
            }
        }
    }

    
    /// :nodoc:
    override func numberOfSections(in tableView: UITableView) -> Int {
        guard let timetable = PrimaryUser.loggedIn?.timetable else {
            return 0
        }
        
