Implement the actual repair.

Instrumentation needs to be improved. But let's first sync up if this is the way to go.