Changed field name sanitization

Dashes are now replaced with underscores, and field names are case
insensitive.