Sample normalization, etc.

Thanks to @b4winckler for the suggestion.