     }
     
     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

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

        longPress.delegate = self
        navigationController?.navigationBar.addGestureRecognizer(longPress)
        
        loadTasks()
        
    }
