beginning editor refactoring for offline support