Refactor alerts and notices.