#38: Dialog refactoring.