Moved index functions to separate class.  Included additional methods for indices.