Refine the layout