Moved tab transition to separate function
Tabs now swap places properly