DataReference refactor
Complete DataReferences + fix tests.
New tests.