Add functionality for switching and retrieving tabs to the tabs library