Modify attachments to be a Map(String -> Any)

This way we can easily extract attachments from anywhere by casting
the values of this Map.