Minor comment and todod updates.
Minor doc updates.
Proper error handling when the query string represents an illegal query.