Editor: more refactoring.