Altered creation of connections to mongo to allow for replications sets to be defined in config.js.