Refactor flashMessager (part 2)