-_ = require 'lodash'
-fs = require 'fs'
-path = require 'path'
+_       = require 'lodash'
+fs      = require 'fs'
+path    = require 'path'
 {Model} = require 'backbone'
 
-{git} = require '../git'
-{FileList} = require './files'
+git                         = require '../git'
+{FileList}                  = require './files'
 {CurrentBranch, BranchList} = require './branches'
-{CommitList} = require './commits'
+{CommitList}                = require './commits'
 
-module.exports =
+# Public: Offers access to core functionality regarding the git repository.
 class Repo extends Model
-  initialize: (opts) ->
-    @file_list = new FileList []
-    @branch_list = new BranchList []
-    @commit_list = new CommitList []
-    @current_branch = new CurrentBranch(@headRefsCount() > 0)
+  # Public: Constructor
+  initialize: ->
+    @fileList      = new FileList []
+    @branchList    = new BranchList []
+    @commitList    = new CommitList []
+    @currentBranch = new CurrentBranch(@headRefsCount() > 0)
     git.on 'reload', @reload
 
-  reload: =>
-    git.setPath()
-    @file_list.reload()
+  # Public: Forces a reload on the repository.
+  reload: ->
+    @fileList.reload()
     if @headRefsCount() > 0
-      @current_branch.reload()
-      @branch_list.reload()
-      @commit_list.reload(@current_branch)
+      @currentBranch.reload()
+      @branchList.reload()
+      @commitList.reload(@currentBranch)
 
+  # Public: Returns the active selection.
+  #
+  # Returns the active selection as {Object}.
   selection: ->
     @active_list.selection()
 
   leaf: ->
     @active_list.leaf()
 
+  # Internal: The commit message file path.
+  #
+  # Returns the commit message file path as {String}.
   commitMessagePath: ->
     path.join(
       atom.project.getRepo()?.getWorkingDirectory(),

        git.createBranch name, ->
          git.git "checkout #{name}"

  initiateGitCommand: ->
    @trigger 'need_input',
      query: 'Git command'
      callback: (command) -> git.git command

  push: ->
    @current_branch.push()

      git.decrementTaskCounter()

  checkoutBranch: ->
    @branchList.checkout_branch

  stash: ->
    git.git 'stash'
