[V0.4] Added methods to clear expired timed tasks

line 464 needs changes