Window now closes when exit button is clicked