Fix exclude_ids and add some documentation