setup: split wire linking method

The code for linking strat and end is almost a duplicate. Now the codepath's are
merged.