Rewrite parameter normalization to be more readable