Bug fixes revealed by adding unit tests.  Removed requirement for attribute named id.