Add references lookup to names output