Organise AppDelegate a little
Re-enable window closing