Helper library for d3 to keep dom code clean