improve name clash handling; add node attributes