Adding in the logic for reference fields
Continuing to fix up the approach to reference fields