Refactor updateRelationships to be promise-based