Added first pass at support for collapsing categories into a single vertex.