Further optimizations to taxonomy graph