Undo/Redo implementation

I made a Undo/Redo implementation. It's tested. The modifications in the index.html was intended for my version only. I tried to stick with the patterns used in the project.