Fixed fft generation. Also added useful comments and descriptive variable names