Refactored delete_attachment to use new methods

Resolves #155