Refactored alarm and plugin code to use fake_shelve