Added documentation to query system