Improves CodeMirror options and upgrades to latest CM head.