Simple implementation of undo/redo in JavaScript