Changes for attachments support

Adds multiple attachmments support