     schemeMsg "#{chalk.red 'removing'} path #{scheme.slots[idx]} in slot #{chalk.yellow idx}"
     delete scheme.slots[idx]
     doAutoCompact() if autoCompact
-    saveSchemes()
+    saveCurrentScheme()
     programDone()
 
   swapSlots: (idx1, idx2) ->


    data.currentScheme = currentScheme = name
    console.error "changing scheme to #{chalk.cyan name}"
    if _.isObject(data.schemes[name])
      saveSchemes()
    else
      console.error chalk.grey "initializing empty scheme object"
      initalizeScheme name
    programDone()

  listSchemes: () ->
    console.error "schemes"
    console.error "------------------------------"
    for scheme in _.keys(data.schemes)
      console.error chalk.gray scheme

  dropScheme: (_scheme) ->
    _scheme ?= currentScheme
    console.error "Droping scheme #{chalk.cyan _scheme}"
    delete schemes[_scheme]
    data.currentScheme = currentScheme = "default" if _scheme is currentScheme
    saveSchemes()
    programDone()

  renameScheme: (name) ->
    return if name is currentScheme
    schemeMsg "renaming scheme #{currentScheme} to '#{name}'"
    schemes[name] = scheme
    delete schemes[currentScheme]
    data.currentScheme = currentScheme = name
    saveSchemes()
    programDone()

  listSlots: () ->
    return schemeMsg "no slots in scheme" unless scheme.slots.length > 0
    schemeMsg "listing slots"
    console.error "------------------------------"
    slots = _.sortBy(_.pairs(scheme.slots), (pair) -> parseInt(pair[0]))

    temp = scheme.slots[idx1]
    scheme.slots[idx1] = scheme.slots[idx2]
    scheme.slots[idx2] = temp
    saveCurrentScheme()
    programDone()

  saveSlot: (idx, _path) ->
