Minor clean up.  Remove unneeded variables. Reduce scope of some variables. Read
sizeof(char) not 1.