Since EG never seems to need to lookup a relationship with just the id, but by (minimally) the type/id pairing. We could change the indexing of the hashes to use type+':'+id as the search key. I'm not certain if this would actually make things any faster (basically trading off string concatenation costs for any increased element isolation and the ability to eliminate the after-search type matching filtering if statement). However, it would make the code slightly more streamlined.