Clean up window on save