Changing scope of global-ish variable