Merge "Refactor the PatchCommandThread for reuse."