Further work on bitwise_distance.c

A missing data handling system is in place, but not currently functional. It still needs some debugging.