Abstracts out switch to tab code
Merge remote-tracking branch 'origin/master'