Refactor IndexDefinitionHash