better elem name checking and numeric property/attr handling