Make unintended global variables script local