More dedup and remove some nonsense