Refactor tabs component