Use STL's bitset instead of doing bit masks ourselves.