Cycle nodes function finds related nodes and changes primary.

TODO: swap locations when the function runs