     if parsedUrl.host is 'core'
       predicate = require('../core-uri-handlers').windowPredicate(parsedUrl)
       bestWindow = @getLastFocusedWindow (win) ->
-        !win.isSpecWindow() && predicate(win)
-
-    bestWindow ?= @getLastFocusedWindow (win) -> !win.isSpecWindow()
+        not win.isSpecWindow() and predicate(win)
+
+    bestWindow ?= @getLastFocusedWindow (win) -> not win.isSpecWindow()
     if bestWindow?
       bestWindow.sendURIMessage url
       bestWindow.focus()

      windowDimensions = @getDimensionsForNewWindow()
      win = new AtomWindow(this, @fileRecoveryService, {resourcePath, windowInitializationScript, devMode, safeMode, windowDimensions, env})
      @windows.addWindow(win)
      win.on 'window:loaded', =>
        win.sendURIMessage url

  findPackageWithName: (packageName, devMode) ->

    @windows.splice(currentIndex, 1) if currentIndex > -1

  getLastFocusedWindow: (predicate) =>
    predicate ?= (win) -> true
    @windows.find(predicate)

  all: =>
    @windows
