Added tests for query parsing (not all tests pass yet)