query: removed custom queries support
Merge branch 'query-refactoring'