getRoot() isTree() graph functions and Huffman init