refs: improve API (#213)

Changes:

- Reference.oid and Reference.hex removed
- Now Reference.target can be assigned an oid