   resourcePath: null
   version: null
 
-  constructor: ({@resourcePath, pathsToOpen, urlsToOpen, @version, test, pidToKillWhenClosed, devMode, newWindow, specDirectory}) ->
+  constructor: (options) ->
+    {@resourcePath, @version} = options
     global.atomApplication = this
 
     @pidsToOpenWindows = {}

    fs.unlinkSync socketPath if fs.existsSync(socketPath)
    server = net.createServer (connection) =>
      connection.on 'data', (data) =>
        options = JSON.parse(data)
        @openPaths(options)

    server.listen socketPath
    server.on 'error', (error) -> console.error 'Application server failed', error

    @handleEvents()
    @checkForUpdates()

    @openBasedOnOptions(options)

  # Private: Opens a new window based on the options provided.
  openBasedOnOptions: ({pathsToOpen, urlsToOpen, test, pidToKillWhenClosed, devMode, newWindow, specDirectory}) ->
    if test
      @runSpecs({exitWhenDone: true, @resourcePath, specDirectory})
    else if pathsToOpen.length > 0
