refactoring the irefindex interactions and groups