Group foreign relations by property type

@alexef @iuliachiriac please review