Rafactoring flash messages