       filenameByKlass = {}
       for file in files
         beforeRequire = _.keys(@getRegistries())
-        # console.time(file)
         require(file)
-        # console.timeEnd(file)
         afterRequire = _.keys(@getRegistries())
-        addedKlass = _.difference(afterRequire, beforeRequire)
-        for klass in addedKlass
+        for klass in _.difference(afterRequire, beforeRequire)
           filenameByKlass[klass] = file
 
-      for __, klass of @getRegistries()# when klass.isCommand()
+      for __, klass of @getRegistries()
         @commandTable[klass.name] = spec = {
           name: klass.name
           file: filenameByKlass[klass.name]

} = require './utils'
swrap = require './selection-wrapper'

Input = null
selectList = null
getEditorState = null # set by Base.init()
CSON = null
LazyLoadedLibs = {}

serializeCommandTable = (specByKlass) ->
  CSON ?= require 'season'
  data = CSON.stringify(specByKlass)
  CommandTablePath = require.resolve('./command-table.cson')
  atom.workspace.open(CommandTablePath).then (editor) ->
    editor.setText(data)

  # -------------------------
  @init: (service, commandTable) ->
    {getEditorState} = service
    isDevMode = atom.inDevMode()
    registerCommandFromTable = (table) =>
      @subscriptions = new CompositeDisposable()
      for name, spec of table when spec.isCommand
        @subscriptions.add(@registerCommandFromSpec(spec))
      @subscriptions

    readTableAndRegisterCommands = =>
      console.time('lazy strategy') if isDevMode
      @commandTable = require('./command-table')
      subs = registerCommandFromTable(@commandTable)
      console.timeEnd('lazy strategy') if isDevMode
      subs

    registerCommandOldStyle = =>
      console.time('old style') if isDevMode
      [
        './operator', './operator-insert', './operator-transform-string',
        './motion', './motion-search', './text-object', './misc-command'
      ].forEach(require)

      @subscriptions = new CompositeDisposable()
      for __, klass of @getRegistries() when klass.isCommand()
        @subscriptions.add(klass.registerCommand())
      console.timeEnd('old style') if isDevMode
      @subscriptions

    registerAndGenerateCommandTable = =>
      console.time('register and gen-cmd-table') if isDevMode
      files = [
        './operator', './operator-insert', './operator-transform-string',
        './motion', './motion-search', './text-object', './misc-command'
