Simplify query method, remove reduce (10. You probably don't need reduce http://pouchdb.com/2014/06/17/12-pro-tips-for-better-code-with-pouchdb.html)