Attachments duplicates & remove attachment event

fixes #207, part of #206