fix accidental global
rename internal, optimize memory usage for GC
really fix GC