Case insensitivity for bit string prefix
More cleanup, more tests.