Extend query task

@jeffjax this adds support for closure-based methods instead of using delegate-based methods

not sure if you want this as is or not...let me know