Move some global constants to local variables