This is a lot of static variables for a specific implementation.  They should move to a structure.