ds_fft functions refactored. Common hidden core function added