Better MIME parsing