Integrate doctest
Stronger test for hamming