Alarm - rewritten with angularjs