An improvement to this class would be to implement `__getitem__`, `__iter__` and `__len__` so that they get and iterate over `children`. I think that would make it easier to work with.