         longPress.delegate = self
         navigationController?.navigationBar.addGestureRecognizer(longPress)
         
-        //Get array of incompleted tasks
-        incompletedTasks = [JHTask]()
-        for t in clas.tasks {
-            if !t.completed {
-                incompletedTasks.append(t)
-            }
-        }
         loadTasks()
         
     }

    
    @objc func navBarLongPress(sender: UILongPressGestureRecognizer? = nil) {
        if sender?.state == UIGestureRecognizerState.began {
            print("Changing display type...")
            changeDisplayType()
        }
    }

    }
    
    func loadTasks() {
        //Get array of incompleted tasks
        incompletedTasks = [JHTask]()
        for t in clas.tasks {
            if !t.completed {
                incompletedTasks.append(t)
            }
        }
        //Get tasks to be displayed
        if displayType == .NotCompleted {
            tasks = incompletedTasks
