Remove dependency on bitarray