Remove use of global variables in flex file.