Add migration for attachments in protocol
Minor fixes