Double-linked hierarchical data-structure with integral type ids