light improvements of CodeMirror helper