Add -Wextra -ansi -pedantic to the Makefile, and fix all the warnings
that this points out, to make sure we can compile on different
systems/compilers.

Also fix some issues with 6-bit that someone found.