Added support for attachments.