Refactors alarms to use a prototype framework

This is a test to see what needs changing in the framework.  Quite a
bit, evidently, as this is way too verbose!  Still, it's OK for a first
cut.