FEND-563, Refactored global.js