Merge "Refactor the imgdiff"