Update to the new pixel_wise syntax. Fix circular dependency in copy.hh