Update tests and Update implementation of flash message