FYI, the window function cleans things up because it gets rid of the "discontinuity" between the 1st and last data points. Any discontinuity, such as you get in a square wave, will add a 1/f component to the Fourier Transform (i.e. 1/f^2 in the power spectrum, or -20 dB/decade). Since the 1st and last data points are treated as consecutive data by the DFT, this -20 dB/dec feature is just an artifact of the spectrum and doesn't represent anything real.
Either a window function, or as somebody else suggested removing the "ramp" in the data (get the best-fit line and subtract it from the data). Either way removes the artificial discontinuity. It's easier to apply the window function, but you can try subtracting the best-fit line from one of your scans (and don't window) just to see what happens.
Regards,
Mark