Slight refactor of constructTabs