Many changes to make compatible with upcoming PHyloBox integration.