ES6ing and removing Balanced global references