Refactoring FFTW wrapper