CodeMirror fixes for loading and update version

CodeMirror fixes for loading and update version, addressing #2207