Add id relation joined

Just merging a ton of unrelated changes.
This branch was going to be separate because of the 'oxygen' TODO, but it was easier to just move on, we'll fix that on master.