Proper way to de initialize library