Revert "Reordering functions: CodeMirror, ajax -> setValue, setMode"

This reverts commit e5cb5e9f04e8916b75df4c7ae93251a57f21310d.
Reordering functions: CodeMirror, ajax -> setValue, setMode