moved the getRelatedElements function from Relation to Element, where it belongs. Bonus is that it's now actually correct.