Refactoring creation of the layout models