Removed: obsolete code. Touchups: various.
Typos. Added: tests for attr checking/sanitization.
Fixed: attr functions were not all adding name to error messages.