Refactor RelationshipsController