More work on indexing

still have to do most of aliases and other things