Javascript rules: UI and CodeMirror