Major layout refactoring