More specs for active_query.
Merge branch 'new_query_structure'