Improved dialog resizing.
Escape key closing dialogs.