Add re-rooting and outgroup-rooting code