Moved mongodb setup out of helper