refactoring, RelationshipUtils class, removing warnings and deprecated calls
fix tests