     func reloadTasks() {
         //Reloads and saves tasks
         saveClasses()
+        loadTasks()
         tableView.reloadData()
     }
     


    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return tasksToDisplay.count
    }
    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = UITableViewCell(style: .subtitle, reuseIdentifier: "taskCell")
        cell.textLabel?.text = tasksToDisplay[indexPath.row].name
        let outputFormatter = DateFormatter()
        outputFormatter.dateStyle = .full
        cell.detailTextLabel?.text = outputFormatter.string(from: tasksToDisplay[indexPath.row].dueDate!)
        return cell
    }
    

    
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        tableView.deselectRow(at: indexPath, animated: true)
        
        let task = tasks[indexPath.row]
        task.completed = !task.completed
        let cell = tableView.cellForRow(at: indexPath)
        if cell?.accessoryType == UITableViewCellAccessoryType.none {
