refactoring the alerts to be less connected to a mnesia schema