Add Refs API.

@christophercurrie
`Next` should probably be a `Path` here.