Fix an invalid class names on assignments.

I thought "2x2" was a valid class name, but it isn't.  We need these so
people can hook into specific templates.  Also added the missing test
for all of this stuff.
Misc spec cleanup.