Refining the layout template