Refactor some flash messages