Fleshed out the case-insensitive collection classes.
Fixed some bugs in the database unit tests.