Added Undo/Redo functionality in code, not in the GUI yet.