   focusNextPane: -> @panes.focusNextPane()
   getFocusedPane: -> @panes.getFocusedPane()
 
-  # Internal: Destroys everything.
+  # Saves all of the open buffers.
+  saveAll: ->
+    @panes.saveAll()
+
+  # Fires a callback on each open {Pane}.
+  #
+  # callback - A {Function} to call
+  eachPane: (callback) ->
+    @panes.eachPane(callback)
+
+  # Retrieves all of the open {Pane}s.
+  #
+  # Returns an {Array} of {Pane}.
+  getPanes: ->
+    @panes.getPanes()
+
+  # Given a {Pane}, this fetches its ID.
+  #
+  # pane - An open {Pane}
+  #
+  # Returns a {Number}.
+  indexOfPane: (pane) ->
+    @panes.indexOfPane(pane)
+
+  # Fires a callback on each open {Editor}.
+  #
+  # callback - A {Function} to call
+  eachEditor: (callback) ->
+    callback(editor) for editor in @getEditors()
+    @on 'editor:attached', (e, editor) -> callback(editor)
+
+  # Fires a callback on each open {EditSession}.
+  #
+  # callback - A {Function} to call
+  eachEditSession: (callback) ->
+    project.eachEditSession(callback)
+
+  # Fires a callback on each open {Buffer}.
+  #
+  # callback - A {Function} to call
+  eachBuffer: (callback) ->
+    project.eachBuffer(callback)
+
+
+  ### Internal ###
+
+  # Destroys everything.
   remove: ->
     editor.remove() for editor in @getEditors()
     project.destroy()
     super
-
-  # Public: Saves all of the open buffers.
-  saveAll: ->
-    @panes.saveAll()
-
-  # Public: Fires a callback on each open {Pane}.
-  #
-  # callback - A {Function} to call
-  eachPane: (callback) ->
-    @panes.eachPane(callback)
-
-  # Public: Retrieves all of the open {Pane}s.
-  #
-  # Returns an {Array} of {Pane}.
-  getPanes: ->
-    @panes.getPanes()
-
-  # Public: Given a {Pane}, this fetches its ID.
-  #
-  # pane - An open {Pane}
-  #
-  # Returns a {Number}.
-  indexOfPane: (pane) ->
-    @panes.indexOfPane(pane)
-
-  # Public: Fires a callback on each open {Editor}.
-  #
-  # callback - A {Function} to call
-  eachEditor: (callback) ->
-    callback(editor) for editor in @getEditors()
-    @on 'editor:attached', (e, editor) -> callback(editor)
-
-  # Public: Fires a callback on each open {EditSession}.
-  #
-  # callback - A {Function} to call
-  eachEditSession: (callback) ->
-    project.eachEditSession(callback)
-
-  # Public: Fires a callback on each open {Buffer}.
-  #
-  # callback - A {Function} to call
-  eachBuffer: (callback) ->
-    project.eachBuffer(callback)


  ### Public ###

  # Public: Shows a dialog asking if the pane was _really_ meant to be closed.
  confirmClose: ->
    @panes.confirmClose()

  # Public: Given a filepath, this opens it in Atom.
  #
  # Returns the `EditSession` for the file URI.
  open: (path, options = {}) ->

        modifiedBuffers.push item.buffer if item.buffer.isModified()
    modifiedBuffers

  # Retrieves all of the paths to open files.
  #
  # Returns an {Array} of {String}s.
  getOpenBufferPaths: ->
    _.uniq(_.flatten(@getEditors().map (editor) -> editor.getOpenBufferPaths()))

  # Retrieves the pane that's currently open.
  #
  # Returns an {Pane}.
  getActivePane: ->
