[POC] Class based indexes

(note newer caching of states)