Rewriting patch infrastructure.