Do not transfer classes, if the original element did not have any.

Avoids "undefined" class entry.
Make sure that any input field name can be handled.

Our names have dots which are not liked without quotes.
Indentation.
Declare variable.