Refactored tab layout
More refactoring