Change Attachments from an array to a dictionary 

Change the Attachments API from being array based to dictionary based.