Added logic to remove stale test cases.