Changed all MongooseQuery references to just be Query

should now be able to safely remove query.js from the repo
fixed small issue in the way res.code was checked