More robust equality checks
Move all class information to a dedicated container
Relaxed type hierarchy once more to allow combinations of weighted and unweighted elements (weighted node with unweighted edges and vice versa)