Refactor addRelations and findRelation functions
Refactor addRelations and findRelation functions

Just reordering and renaming variables to reduce indentation, logic remains the same.

begriffs/postgrest,steve-chavez/postgrest,diogob/postgrest,steve-chavez/postgrest