Moved FFT to its own source file to remove copypasta and to make replacing the FFT implementation easier