Performance improved with new _iter_category and _iter_categories methods.