More work on query parsing.