Updated FFT to use pure functional algorithm