Added Undo/Redo Functionality, we have to fix some bugs though