Refactor alerts to a partial