FFT code and related stuff