Refactor ActiveAlarm message handler.