More work on add_data, almost done.