Removed all use of 'query', as it is a keyword prior to R16