Reimplementation of NEWICK tests