Clear function now undo-able