Updated `resolveRelations` function to use a more functional programming style.
Updated `resolveRelations` function to use a more functional programming style.

fedtuck/Spine,fedtuck/Spine,wvteijlingen/Spine,wvteijlingen/Spine