Updates. I haven't figured how to return an breadth-first array from a tree, and it's giving segfault.