Shared layouts refactoring