undo/redo fix

Fix the code to use vectors instead of maps for the list of previously
executed commands.