Normalize inputs.