Added logic to collect clusters of links instead of nodes
Made it recursive to keep @thetrav happy.