Fixed vertex connectivity to use nx and not an external library