Manages attachments and deletion

delete shouldn't be used on variable. It is correct to use it to remove a property of an object.