Make relations and schemas point to their contents

(rather than merely holding on their ids)