Refactor.
Support opening files in the editor.