[POC] Class based indexes

I think you should keep the old code here -- that way, you avoid new semantics as much as possible (also, with this change I think you lose the deprecation warning)