 
 class ChirpJamViewController: UIViewController, UIDocumentInteractionControllerDelegate, BrowseControllerDelegate {
     /// Maximum allowed recording time.
-    var state = ChirpJamModes.idle
-    var mode = ChirpJamModes.new
+    
+    var state = ChirpJamModes.idle // Tells us if the app is playing, recording or idle
+    var mode = ChirpJamModes.new // Tells us which mode the chirp jam is in: new, composing, loaded
+    
     var newPerformance : Bool = true
     var jamming : Bool = false
     var progress = 0.0

                        // Adding performance to clouad
                        appDelegate.performanceStore.addNew(performance: performance)
                        // Reset view controller
                        self.newRecordingView()

                        // TODO: Maybe it is best to delete the view controller to save memory?


                print("JAMVC: Save button segue!")

                if mode == ChirpJamModes.composing {
                    // TODO: Store composing performances
                    print("Need implementation for storing compositions...")

                    while let perf = performanceViews.popLast() {
                        perf.removeFromSuperview()
                    }
                    newRecordingView()

                    return
                }
