minor spelling and formatting consistency changes
use UCHAR_MAX from limits.h instead of defining our own