Make find_repr_loci and associated function more understandable