refactor mime type handling