Mongo connection automatically closes after writing data
Bit of work on index.html / d3