CGE2: Implement deinitialization properly.