moved IndexReference into a separate class and cleaned-up Index array accessor so it returns an IndexRecord