Added tree conversion (unidirectional <-> bidirectional)