How to clean up Serial port buffer

serialEvent() is called whenever Serial.available() > 0.

No. The serialEvent() function is called at the end of loop(), if Serial.available() returns greater than 0.