Can you explain to me in your own words what you think the flash() function does? Here, I'll reproduce it:
void flash ()
{
digitalWrite (LED, HIGH);
digitalWrite (LED, LOW);
} // end of flash
Once you have told me what it does, can you tell me if your program needs it to do that or not?