New logic in layouts