Code cleanups: Don't call <ctype.h> macros with plain char arguments; initialize some local variables