Make Mongo actually work, and close connections too