Refactor tabs