added comments and fixed spectral_contrast warnings