Layouts refactoring