Localize all function scope to script namespace