Minor changes, fixed _choose_wavelength