Normalize codes.