Add advanced section to documentation.
Change doc to last changes to query functions.
Minor changes to with-query macro.