move alarms javascript to alarms.js