 
   # currently broken. FIXME: Remove or replace
   resolveJSPaths: (html) =>
-    # console.log('INISDE RESOLVE')
     html = $(html)
-
 
     # scrList = html.find("#mainScript")
     scrList = [html[5]]
-
-    # console.log('html', html)
-    # console.log('hi')
-    # console.log('srcList', scrList)
 
     for scrElement in scrList
       js = $(scrElement)
       src = js.attr('src')
       # continue if src.match /^(https?:\/\/)/
       js.attr('src', path.resolve(path.dirname(@getPath()), src))
-      # console.log 'js', js
     html
 
   showLoading: ->
     @html $$$ ->
       @div class: 'markdown-spinner', 'Loading Todos...'
 
-
-
-
-  #get the regexes to look for from the settings
+  # Get the regexes to look for from settings
   # @FIXME: Add proper comments
   # @param settingsRegexes {array} - An array of regexes from settings.
   buildRegexLookups: (settingsRegexes) ->

    #     pane.activateItem(this)


  # open a new window, and load the file that we need.
  # we call this from the results view. This will open the result file in the left pane.
  openPath: (filePath, cursorCoords) ->
    return unless filePath

    #if there's no workspace, create a workspace... Doesn't appear to be necessary?
    # console.log('workspace', atom.workspace)

    atom.workspaceView.open(filePath, split: 'left', {@allowActiveEditorChange}).done =>
      @moveCursorTo(cursorCoords)


          # strip out the regex token from the found phrase (todo, fixme, etc)
          # FIXME: I have no idea why this requires a stupid while loop. Figure it out and/or fix it.
          while (match = regexObj.exec(regExMatch.matchText))
            regExMatch.matchText = match[1].trim()

        lookupObj.results.push(e) # add it to the array of results for this regex

  renderTodos: ->
    @showLoading()

    # fetch the reges from the settings
    regexes = @buildRegexLookups(atom.config.get('todo-show.findTheseRegexes'))

    # @FIXME: abstract this into a separate, testable function?
    promises = []
    for regexObj in regexes
      # scan the project for each regex, and get a promise in return
      promise = @fetchRegexItem(regexObj)
      promises.push(promise) # create array of promises so we can listen for completion

    # fire callback when ALL project scans are done
    Q.all(promises).then () =>
