Move opening/closing of tabs to tabs_manager.