Fix tests to reuse code from class Index and fix README

Methods of class Index are adjusted in order to be called from tests