Refactors tabs