     @operationSubscriptions.add(handler)
     handler # DONT REMOVE
 
+  reset: ->
+    @resetCount()
+    @stack = []
+    @processing = false
+    @operationSubscriptions?.dispose()
+    @operationSubscriptions = new CompositeDisposable
+
+  destroy: ->
+    @operationSubscriptions?.dispose()
+    {@stack, @operationSubscriptions} = {}
+
   # Stack manipulation
   # -------------------------
   push: (operation) ->

      if commandName = top.constructor.getCommandNameWithoutPrefix?()
        @addToClassList(commandName + "-pending")

  addToClassList: (className) ->
    @editorElement.classList.add(className)
    @subscribe new Disposable =>
      @editorElement.classList.remove(className)

  execute: (operation) ->
    execution = operation.execute()
    if execution instanceof Promise

      @vimState.resetNormalMode()
    @finish()

  finish: (operation=null) ->
    @recordedOperation = operation if operation?.isRecordable()
    @vimState.emitter.emit('did-finish-operation')

    if @vimState.isMode('normal')
