refactoring and first tests for index model
added basic tests for cluster

for both 0.90 and 1.0 branches. maybe makes sense having all tests here, even if separated by “models”. since the construction of cluster model will fail if other sub models fail