Added signal handler for closing window.