Added method to get vertices with no children, i.e. at the end of the tree