Variables instantiation removed when possible.
New method to find the root.
New method to determine if a graph is a rooted tree.