moved static variables into a structure.