Category matching logic now working.