Revert "Custom Queries"

This reverts commit f8a58e2bccdc3e7b7180be7cbb3187cd0c2d051e.
Revert "Revert "Custom Queries""

This reverts commit d5f1f6469f5d3231f0e569c9e7006335310db42b.