Adds undo function, needs debugging, and prototype