Fix issue #10: $editor was broken when code got reorganized