Updates the layout