Added cleanup implementation