Alarms refactoring