Added structure of undo and redo, still a work in progress