*refactored editor a bit.