Move patch cleanup into watch so it's easier to test.