Add verbose mode, add testing framework
Make algorithm work when the root has a self-edge
Fix display error in test suite
Fix validation when root is the second node of an edge, it is allowed to have no parent
Allow parents not to be in the BFS tree, even if the child is (there might be another parent leading to root)