Fixed typo in header guard.
Removed unused static variables.
Removed or #if-ed out unused routines.