FFT implementation and lots of polishing.