First commit on hamming-distance branch