Fixed bugs where negative fluxes caused lots of NaN and Inf in the spectra.
Added starlight mask to first pass fitting.
Properly calculating the integrated spectra.