+refactoring index names; +improve min header detection