Add cached lookup for cat, num, ts fields

Greatly reduces runtime