Optimized normalization calculations.
Beginnings of input sanitization