Everything is not messed up anymore...

Memory consumption still too high when generating indices.