minor code cleanups
codemirror mods