Refactor, improve test coverage.
Support for associated objects.
Add equality methods.
Name and style fixes.