Added layout-logic