refactors editor