Remove global variables only used in one function.