layouts refactoring