updated `Graph.removeNode` to correctly remove all the connected shapes