Updated fit_absorption_profile to account for background pixels, calculate EW and other minor things