Remove some more debug code
Change application-facing interface from client-and-index oriented to object oriented