fix compiler warnings
 still requires "-Wno-char-subscripts" when compiled with "-Wall"
Style changes