Refactor ENV var setting in mongodb:link