Cleaning code
Including set time out to flash messages