deque class, text delegate, redo/undo almost there