CGE2: Reduce the scope of some variables