Periodic tasks and datastore cleanup upon insert