Duplicate keyword detection and cleanup