Alerts refactoring