Massive rewriting