Typewriter: add a preferences window with a button to clear the undo history