Modified to fix unit test failure of StripPeaks. Refs #7789.
Cleaned the code in unit test. Refs #7789.