Move patch-specific methods to the patch module.
Make the public API small but complete.