Remove spikes and self-intersection