Changed deinit() to finalize() in Environment