Added query.jade to make a proper index.jade.  Also removed async and slight refactorings.