Move stuff to get args outside of image_handler