These two "normalize" methods seem to be doing very different things. Could you add some comments explaining what the normalization rules are?