Added a 'close_on_esc' option