attachments and more refactoring