Change some strings to leafrefs in NSD model