Fixing issue with Provider ID being given as a BSON::ObjectId

The database stores this ID as a plain String
Also refactored the provider query