Combined Normalize v1 to v2

improved cross browser capability