Work more on query tree structure.