Add methods to calculate XOR and bucket index.
Remove obsolete comment.