Initial implementation of patch command and flush.