More features in refactored persistence.ts.
CodeMirror update.