Weight functions and subtractions in dispersion theory