Refactored reaction handler handling