Changed Relation and improved unit tests.