Switch to ids and add ESC key listener