Renamed ensure_hash_index to index
Changed index param name opt to options