Refactoring and D3Graph addition