Refine main table layout