 
   getPublishedApps: (callback) ->
     # return unless KD.isLoggedIn()
-    appNames = []
-    appNames.push appName for appName, manifest of @getManifests()
-
-    query = "manifest.name": "$in": appNames
+    appNames = appName for appName, manifest of @getManifests()
+    query    = "manifest.name": "$in": appNames
+
     KD.remote.api.JApp.someWithRelationship query, {}, (err, apps) =>
       @publishedApps = map = {}
       apps.forEach (app) =>

      return warn err  if err

      existingApps = @filterAppsFromFileList files

      for app in existingApps
        newApps.push app  if app not in currentApps

      for app in currentApps
        removedApps.push app  if app not in existingApps

      log "APPS FOUND IN AppStorage:", currentApps
      log "APPS FOUND IN FS:", existingApps


    for key, app of @getManifests()
      fileTypes = app.fileTypes
      continue  unless fileTypes
      for type in fileTypes
        map[type] or= []
        map[type].push app.name

    # Still there should be a more elagant way to add ace file types into map.
    for type in KD.getAppOptions("Ace").fileTypes
      map[type] or= []
      map[type].push "Ace"

  fetchUserDefaultAppConfig: ->
