Added GUI script and added destroy signal handler