Struct/Tree Generator of unique ids