Move api.query to app

And remove api.js
Merge remote-tracking branch 'upstream/master'