Some cleanup.
Optimized that to memorize refer-global