Added functionality to refine tables.