Added a lot of Alarm code, mostly working