Renamed reference field to case and doc fields