Clean up debug messages
make jpeg pre-scaling work with older ImageMagick
general cleanup