In regards to making a better tree, perhaps using clojure.zip would be best, like [hickory](https://github.com/davidsantiago/hickory)?