Ported treeCOMsolver to UndirectedTreeSolver