More changes to get attachments working.