Better automatic category handling