Added haplotype caching.