Various changes to fix problems with test cases. Can now distinguish between char and bit cases.