Fix memory leak - forgot to free children list
Cleanup - fix typo, remove debug line
Allocate a new tree with tree_new, not manually
Refactor for efficiency and code reuse

* Rewrite `tree_new` to have a default symbol
* Make the `children` array resize by doubling. This means adding a counter
for the number of available slots for children, called `child_slots`
Add comments to hashmap