Dealing with patches in a tidy way.