Refactor tab classes