Index is now an imperative structure, based on hashtables
adapted Rewriting to the imperative Index