Relationship tests, refactoring and other measures