Added Undo/Redo buttons with functionality.