Add references for template refs