clean up some globals