Simplify `visualizeConnections` method
Fix bug: correct way to cut off connections