Remove duplicate definition of RefinementData
Add logic for refinement rules