refactoring of the node editor with D3

Cheers to @jto