Add new tests, clean the code that shows flash messages