Added support for creating custom patches.