Update to tab + conditional logic to swap active tab

Signed-off-by: Elliot Condon <e@elliotcondon.com>