Starting to add logic for which tab is active.