         _console.debug observer
         _console.debug config
         observer.observe target, config
-
+    ###
     #<section id='getDir'/>
 
     # getDir
     # ------
 
-    # This function function fetches the directory listing for a path on a given repo and branch.
+    # This function function fetches the directory listing for a path
+    # on a given repo and branch.
+    ###
     getDir = (path, callback) ->
       node = undefined
       name = undefined
 
       # remove trailing '/' for API requests.
-      path = path.substr(0, path.length - 1)  if path and path.length > 1 and path[path.length - 1] is "/"
+      path = path[...-1] if path and path.length > 1 and _.last path is "/"
       if not path or (path.length is 1 and path is "/")
-
         # item 0, root, each command a subdir
         name = "/"
         node =

            _console.debug "[Josh.FeedlyConsole] json to nodes %O.", json
            node.children = makeJSONNodes(path, json, name)
            callback node

        else

          # item 2+, details
          _console.debug "[Josh.FeedlyConsole] not implemented, path: %s, name %s", path, name
          get "streams/"
          callback `undefined`

    #<section id='getPathParts'/>

    # getPathParts
    # ------------

    # This function splits a path on `/` and removes any empty trailing element.
    getPathParts = (path) ->
      parts = path.split("/")
      return parts.slice(0, parts.length - 1)  if parts[parts.length - 1] is ""

            limit: parseInt(xhr.getResponseHeader("X-RateLimit-Limit"))
            authenticated: xhr.getResponseHeader("Authenticated") is "true"

          $("#ratelimit").html _self
          .shell.templates.rateLimitTemplate(ratelimit)
          if ratelimit.remaining is 0
            alert "Whoops, you've hit the github rate limit. You'll need
 to authenticate to continue"
            _self.shell.deactivate()
            return null

