Added cleanup thread