Making scheduler, adding delete function