Get rid of globals