refactored mimeextension support and renamed to image_mieme_extension; cleanup around variable names