More robust editor window and settings handling.