Adds ability to undo until page is cleared and fixes bug where undo button would not refresh view until mousemove