Added the rest of the undo feature