Extract mongo uri into its own module.

I don’t think this is correct.