Vastly improved doc for xrd algorithm.