Add Repository pointer to Reference.

As asked in #221.