Rename index to query index, add working query parser code.