Create Mongo template factory