Add relation reader

I'm still not sure what relations are, but I guess they'll turn out to
be useful later.