Added code to close app by pressing 'Escape' button