Add tab exchange functionality