Add comments and rewrite one function to be more easy to understand, hopefully without introducing bugs
Add comments and rewrite one function to be more easy to understand, hopefully without introducing bugs

HazyResearch/dd-genomics,rionda/dd-genomics,HazyResearch/dd-genomics,HazyResearch/dd-genomics,amwenger/dd-genomics,rionda/dd-genomics,HazyResearch/dd-genomics,amwenger/dd-genomics,HazyResearch/dd-genomics,amwenger/dd-genomics