Refactor editor widget.