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

fixes #1