Changed back to hidden form and added save on shutdown