Added escape-to-close feature.