Added  to remove expired tasks