Refactoring after simplifying interaction detection