Undo and Redo in JavaScript
A few design enhancements