Correct deletion/addition of node by assigning class to the nodes svg
group element instead of just the circle element.