More fixes, removed TREE_NODE structure and array.