Made mimetype handling easier/configurable