Finish query parsing, mostly.