Misc changes to image processing