Added option to normalize by integral.