Commented function for back-end undo