averaging spectrums and extensive commenting

can not average several spectrums and lots of commenting