Reworked to use graphml input taxonomy for faster distances calculations.