Allow different attributes with equal names.
Also added better namespace handling