Transferred rarefaction from DiversityStats to a separate script. More refactoring