Refactor CR check
Update Circular Reference checking