Cleaned up code in editor.js and updated README.md