refactor tab operations into TabController object