Added option to minimize to tray when closing