Add `root?` method and refactor `compress_tree!`.