Added a barycentric refinement flag to grid
Merge fixes