Some refactoring and renaming after adding support for attachments.
More renaming.