-Fine tuned undo and redo, now actually works well. The caret now
updates with the undo and redos as well, though this functionality is
still young and needs some work.