Boolean database fields should be properly mapped into structs

This at least partially addresses issue #22, which I also ran into.