This connects to mongo DB twice, the second time without including the URL.  And it seems only the second one is actually used.