Rewrite alarm clock to decouple it from the Application