Add tests for duplicate unit parts

A few cosmetic changes to the out are included here. Tests for dangling
parts need more work: a second check-in will be needed for that.