     callback = @generateLogCallback _callback, 'remove-device', device
     async.series [
       async.apply @stopDevice, device
-      async.apply @removeDeletedDeviceDirectory, device
     ], callback
 
-  getDevicePath: (device) =>
-    path.join @config.devicePath, device.uuid
+  getConnectorPath: (device) =>
+    return path.join @config.tmpPath, 'node_modules', device.connector
 
   spawnChildProcess: (device, _callback=->) =>
     callback = @generateLogCallback _callback, 'spawn-child-process', device
-    devicePath = @getDevicePath device
-    @writeMeshbluJSON devicePath, device, (error) =>
-      return callback error if error?
+    connectorPath = @getConnectorPath device
+    debugEnv = device?.env?.DEBUG
+    debugEnv ?= process.env.DEBUG
+    environment =
+      DEBUG: debugEnv
+      MESHBLU_UUID: device.uuid
+      MESHBLU_TOKEN: device.token
+      MESHBLU_SERVER: @config.server
+      MESHBLU_PORT: @config.port
+    foreverOptions =
+      max: 1
+      silent: true
+      args: []
+      env: environment
+      cwd: connectorPath
+      command: 'node'
+      checkFile: false
 
-      pathSep = ':'
-      pathSep = ';' if process.platform == 'win32'
+    child = new (forever.Monitor)('command.js', foreverOptions)
+    child.on 'stderr', (data) =>
+      debug 'stderr', device.uuid, data.toString()
+      @emit 'stderr', data.toString(), device
+      @sendLogMessage 'spawn-child-process', 'stderr', device, {message:data.toString()}
 
-      env =
-        'DEBUG' : process.env['DEBUG']
+    child.on 'stdout', (data) =>
+      debug 'stdout', device.uuid, data.toString()
+      @emit 'stdout', data.toString(), device
+      @sendLogMessage 'spawn-child-process', 'stdout', device, {message:data.toString()}
 
-      foreverOptions =
-        max: 1
-        silent: true
-        args: []
-        env: env
-        cwd: devicePath
-        logFile: path.join devicePath, 'forever.log'
-        outFile: path.join devicePath, 'forever.stdout'
-        errFile: path.join devicePath, 'forever.stderr'
-        command: 'node'
-        checkFile: false
+    child.on 'stop', =>
+      debug "process for #{device.uuid} stopped."
+      delete @deviceProcesses[device.uuid]
+      @sendLogMessage 'spawn-child-process', 'stop', device
 
-      child = new (forever.Monitor)('command.js', foreverOptions)
-      child.on 'stderr', (data) =>
-        debug 'stderr', device.uuid, data.toString()
-        @emit 'stderr', data.toString(), device
-        @sendLogMessage 'spawn-child-process', 'stderr', device, {message:data.toString()}
+    child.on 'exit', =>
+      debug "process for #{device.uuid} stopped."
+      delete @deviceProcesses[device.uuid]
+      @sendLogMessage 'spawn-child-process', 'exit', device
 
-      child.on 'stdout', (data) =>
-        debug 'stdout', device.uuid, data.toString()
-        @emit 'stdout', data.toString(), device
-        @sendLogMessage 'spawn-child-process', 'stdout', device, {message:data.toString()}
+    child.on 'error', (err) =>
+      debug 'error', err
+      @sendLogMessage 'spawn-child-process', 'error', device, err
 
-      child.on 'stop', =>
-        debug "process for #{device.uuid} stopped."
-        delete @deviceProcesses[device.uuid]
-        @sendLogMessage 'spawn-child-process', 'stop', device
+    child.on 'exit:code', (code) =>
+      debug 'exit:code', code
+      @sendLogMessage 'spawn-child-process', 'exit-code', device, {message:code}
 
-      child.on 'exit', =>
-        debug "process for #{device.uuid} stopped."
-        delete @deviceProcesses[device.uuid]
-        @sendLogMessage 'spawn-child-process', 'exit', device
-
-      child.on 'error', (err) =>
-        debug 'error', err
-        @sendLogMessage 'spawn-child-process', 'error', device, err
-
-      child.on 'exit:code', (code) =>
-        debug 'exit:code', code
-        @sendLogMessage 'spawn-child-process', 'exit-code', device, {message:code}
-
-      debug 'forever', {uuid: device.uuid, name: device.name}, 'starting'
-      child.start()
-      callback null, child
+    debug 'forever', {uuid: device.uuid, name: device.name}, 'starting'
+    child.start()
+    callback null, child
 
   startDevice : (device, _callback=->) =>
     callback = @generateLogCallback _callback, 'start-device', device

    connectorManager = new ConnectorManager @config.tmpPath, connector
    connectorManager.install (error) =>
      if error?
        debug 'install error', 'doing rimraf on', @config.tmpPath, '/node_modules/', connector
        rimraf @config.tmpPath + '/node_modules/' + connector, (error) =>
          debug 'unable to delete tmpPath!', error
        return callback error
      debug 'connector installed', connector
      @connectorsInstalled[connector] = true

  setupDevice: (device, _callback) =>
    callback = @generateLogCallback _callback, 'setup-device', device
    return callback new Error('Invalid connector') if _.isEmpty device.connector
    callback()

  shutdown: (_callback=->) =>
    callback = @generateLogCallback _callback, 'shutdown'
