Test for schedule functions

 - Add test for wipe and flush old records
 - Fix wipe method