Code is better commented in editor.js