Added Undo/Redo Functionality

Added functionality to undo and redo text in the code box.