Patch cleanup