Added tag sanitization and removed debug