Split phylotraitdist() into 3 separate functions