Refactored mime type replacings.