remove useless global variables