Add a method to remove CodeMirror listeners