Refactored alarmSwitch code. .done is now .alarmed