Further refactoring; global.js removed; content moved to edit-box.js