Eliminate some global state