bit-vector code cleanup