move main to editor.