refactor notices and alerts