Don't depend on a specific D3 version. Fixes #2
Move identity function into closure. Fixes #1