simplify denoise_patch_dict and remove patch manipulation functions