clean up JPEG metadata code