Refactor alarmservice logic to fix duplicate clearAlarm calls