Refactor the tab bar view controller