Finalizing the layout