 
     # listen to all our actions
     @endCommandBatch.listen @_endComandBatch, @
+    @undo.listen @_undo, @
+    @redo.listen @_redo, @
 
   startCommandBatch: ->
     @currentBatch = new CommandBatch() unless @currentBatch

  canUndo: ->
    return @stackPosition >= 0

  redo: ->
    if @canRedo()
      @stackPosition++
      result = @commands[@stackPosition].redo @debug

    @log() if @debug
    result

  undo: Reflux.createAction()

  _undo: ->
    if @canUndo()
      result = @commands[@stackPosition].undo @debug
      @stackPosition--
