Layout logic changes