Added new code to refine mesh.