tests and flash messages updated.