Renamed Item to Element - the base type for both vertex and edge; moved some stuff around