cleaned up the front-end undo function