reconfigured to use more efficient eventPage and alarm instead of background page and setTimeout