Refactored bit_array and bit_vector into the same class.