Added documentation for queries and collections